All ‘featured thumbnails’ appear in every post excerpt.
I have 3 published posts on my front page (it’s a test site so I cannot include a link), one on top of the other. I have Advanced Excerpt installed and the following code (copied from the WordPress Codex and from a forum post helping me remove the default <p> tag from excerpts). I’m also only calling the loop once and that’s within the page template (as shown below).
Everything works nicely and looks how it should apart from the fact that each post has the thumbnail of the other posts within it, instead of just its own!
So if I publish 2 posts, I get 2 thumbnails per excerpt, 3 posts = 3 thumbnails per excerpt, 5 posts = 5 thumbnails per excerpt, and so on. I only need the 1 correct thumbnail that’s attached to post to appear.
Can anyone help me with this? I was going to have the most recent post on the first page (which would work fine as its only 1) but also use this code for my blog page (instead of a plugin) which would have many posts resulting in x amount of thumbnails per excerpt.
Here’s the code I use in my template:
- The topic ‘All ‘featured thumbnails’ appear in every post excerpt.’ is closed to new replies.