• Resolved Rick

    (@rferrall)


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Rick,

    It sounds like you’ve already been through the steps of excluding a plugin conflict or a caching issue. But from what you describe it’s not clear to me if you can exclude the theme (or your child-theme) yet as being the problem. Have you tried switching to the parent theme only, or one of the default themes?

    Also, you might try adding some content to the excerpt of a couple of you latest posts for testing, to tsee if that makes any difference?

    You could create a duplicate of your site on a subdomain for testing with the duplicator plugin if you don’t want to try this on your live site.

    I hope that helps you in some way.

    Good luck!

    Dave

    Thread Starter Rick

    (@rferrall)

    Thank you for your reply. I had not excluded the child theme, only what I thought it could be within the child theme. After moving over to the parent theme, the behaviour went away.

    I have something in my child theme functions file that was working with the content, but using a global variable. When I changed it to a local variable, the behaviour went away.

    Thanks again for the response — it helped me to more quickly find the resolution.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.