I was working on a project of mine, a WordPress theme. I was working with a loop to display most viewed post of the site. Well, the loop was working. Thumbnail, not so much. It kept repeating the thumbnail from the first post of the loop, through all the post. It’s not only frustrating, annoying too. I spend about 2 days fixing it, nothing. All WP functions related to thumbnail , tried and failed. So when I was about to give up and put a plugin to solve this shit, I suddenly realise, the thumbnail has no reason to work. I have to call the post before I can fetch its thumbnail. I was so busy fetching everything else, I forgot about the_post(); function. Shame on me!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.