WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[Plugin WordPress SEO by Yoast] After update breaks multiple loops (10 posts)

  1. clareswindlehurst
    Member
    Posted 3 years ago #

    Strangest thing - I have a homepage with multiple loops that worked perfectly until I upgraded the SEO plugin and then it broke. Each loop displays the first post it is supposed to, and then X number of recent posts depending on the number X set in the reading menu.

    I saw an update today so I applied that in case it was a fix and it's still broken.

    It would be great if we could understand what happened here as I don't want to switch to another SEO plugin. I'm going to have to try and track down a previous version so that i can still use it.

  2. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    Does your homepage do these query modifications before calling get_header?

  3. clareswindlehurst
    Member
    Posted 3 years ago #

    Hello.

    No - get_header is called within the header.php file and then I am using the loop within the home.php file.

  4. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    you're mixing up things. Your home.php calls the

    get_header

    Your header.php calls

    wp_head

    I'm asking whether the former is done before you change the query :)

  5. clareswindlehurst
    Member
    Posted 3 years ago #

    oops sorry yes.

    I'm using the TwentyTen theme as a base so the code looks like this:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    It works fine when I roll back the plugin to the older version.

  6. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    Hi could you add the code again using the pastebin linked above, apparently a moderator removed it and can't see it now.

  7. clareswindlehurst
    Member
    Posted 3 years ago #

    See below for link

  8. clareswindlehurst
    Member
    Posted 3 years ago #

    Not sure if I did that right - never used Pastebin before. Here's the link just in case: http://pastebin.com/Kqspar6S

  9. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    That is weird, so all the modification is done after get_header. Could you try doing wp_reset_query(); right after get_header() and see if that fixes it?

  10. clareswindlehurst
    Member
    Posted 3 years ago #

    No luck I'm afraid. I added in that line, re-updated the plugin and the same problem occurred.

    I'm just re-reading the codex instructions to ensure I have set the loops up properly, though it is odd that they work perfectly fine until I update the plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic