I just can't win with this project! All of a sudden, each post's gallery photos are showing up in the excerpt/preview of the post. Each post has a gallery of images that should only be visible on the actual post's page. Can anyone see what might be causing this?
Here is my code:
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}
else {
get_the_image( array('size' => 'thumbnail',
'image_class' => 'wp-post-image'));
}
Then in my functions file:
// This theme displays custom size (page-single) featured image on the Post's page
function InsertFeaturedImage($content) {
global $post;
$original_content = $content;
if ( current_theme_supports( 'post-thumbnails' ) ) {
if ((is_page()) || (is_single())) {
$content = get_the_image( array( 'size' => 'full' ) );
$content .= $original_content;
}
}
return $content;
}
add_filter( 'the_content', 'InsertFeaturedImage' );
You can view the site in question here: http://dependablecarcompany.com
You'll see the horribly broken site in question. There should only be the ONE excerpt representative thumbnail there, and not all the thumbs from the gallery too.
Thank You!