I'm trying to get the thumbnail of my featured image to display on my home.php (blog) page.
It is displaying fine, but when debugging mode is turned on, I get this error:
Notice: Trying to get property of non-object in /Applications/MAMP/htdocs/wpflat/wp-content/themes/wpflat/content-blog.php on line 2
My code is
<a href="<?php the_permalink();?>"><?php echo get_the_post_thumbnail($page->id, 'thumbnail'); ?></a>
How do I solve this issue?