Featured Image not showing for posts on homepage
-
I am using the white theme and the features images do no seem to be working, I don’t know PHP but am comfortable editing with a little direction. Looking at the code, this is what I see in the content-grid.php file (which seems to be responsible for displaying recent posts on the homepage)
<?php if (has_post_thumbnail()) : ?> <a href="<?php the_permalink() ?>" title="<?php the_title() ?>"><?php the_post_thumbnail('grid'); ?></a> <?php else: ?> <a href="<?php the_permalink() ?>" title="<?php the_title() ?>"><img src="<?php echo get_template_directory_uri()."/assets/images/placeholder.jpg"; ?>"></a> <?php endif; ?>
Seems to me that this if is getting a boolean value, but I don’t see where it is actually defining an individual post. Also, looking in function.php it seems that has_post_thumbnail() is definitely looking to be passed some parameters, and I have tried a few ways to pass them to no avail. Also, the featured images are not showing up on the post’s page, though that is not really a big deal. Right now the second part of the if statement is executing and default images that came with the theme are displaying.
How do I fix this?
Any help is much appreciated.
- The topic ‘Featured Image not showing for posts on homepage’ is closed to new replies.