alt itemprop

Mauer Themes Support Stills alt itemprop

This topic contains 2 replies, has 2 voices, and was last updated by  steinmann 6 days, 2 hours ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2590

    steinmann
    Participant

    Hi Paul
    seams that the ‘alt itemprop’ is also not send out in the Theme ‘Stills’
    any fix ?

    #2610

    Paul
    Keymaster

    Hi Mic,

    Please head to the functions.php file and replace the following line:

    $output .= "<img src='" . esc_url($img_reg[0]) . "' class='" . esc_attr($img_class) . "' alt='" . esc_attr($post_excerpt) . "' itemprop='thumbnail' />";

    with this:

    $output .= "<img src='" . esc_url($img_reg[0]) . "' class='" . esc_attr($img_class) . "' alt='" . get_post_meta($id, '_wp_attachment_image_alt', true) . "' itemprop='thumbnail' />";

    So that the end result looks like this — screenshot.

    Regards,
    Paul

    #2615

    steinmann
    Participant

    Thank you Paul – now the alt-text are exported properly from the galleries.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.