• Resolved jj

    (@jjjoel)


    We are using the my_content shortcode to display a list of services, but have noticed recently that some posts in the list display the current page’s featured image instead of the post’s thumbnail. We use the {medium} tag in the list template and noticed that when changing the tag to {full} they display the correct image.

    After a bit of debugging it looks to be due to line 218 in mcm-view-custom-posts.php:

    $p[$size] = get_the_post_thumbnail( get_the_ID(), $size, array( 'class'=>'', 'alt'=>trim( strip_tags( get_the_title() ) ), 'title'=>'' ) );

    Changing get_the_ID() to the $id variable set earlier in that bit of code seems to fix (not quite sure why, but it works!). Would be good if the fix could be released as part of the main plugin.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Incorrect thumbnail loading in shortcode list’ is closed to new replies.