the_excerpt returns same value for all posts on blog page
-
Expounding on what the title states, there are 6 posts showing on each blog page. For each of those posts in the loop, the correct title and post link shows up, but the excerpt from the first post on the page is used for the excerpt for every post on that page. Going on to Page 2, Page 3, etc, it’s the same — the first excerpt is repeated for all posts.
I have disabled each plugin one by one, cleared cache after each disable, refreshed page with caching disabled and the problem still persists.
In the theme, there are only two references to the_excerpt, and they don’t do anything to change the behavior, they just call the function.
In wp_posts table, the excerpt column, I think it’s called, or post_excerpt, is empty.
I am using a child theme, but I overwrote my changes for template-parts/content* to what the parent theme contains, the behavior remains the same.
I don’t know where to look next. I’m don’t code in php, but mildly comfortable enough to look through it. My next move is to setup a clean WordPress instance somewhere, copy the theme over, import the database, then add plugins one by one to see if I can replicate it. However, that’s a lot of work and I’ve spent a lot of time on this already, so hoping someone knows of something that can cause this or knows something else I can look at. I’ve seen something like this in Perl, but not sure how to empty the value of the_excerpt before the loop runs again, or if that might be the appropriate route.
Any help is appreciated.
- You must be logged in to reply to this topic.