alt itemprop

Mauer Themes Support Stills alt itemprop

This topic contains 3 replies, has 2 voices, and was last updated by  Paul 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 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.

    #2833

    Paul
    Keymaster

    You are welcome, Mic.

    I’ll also include this fix into the theme code next time I update it.

    Regards,
    Paul

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

You must be logged in to reply to this topic.