• Resolved Tim Bowen

    (@creativeslice)


    This plugin works great for 99% of my pages. However on page which I’m doing a custom get_posts call (in additional to the regular loop) WordPress SEO is using the last post in the query page title instead of the actual page title. For example I have a Site Map page but instead of showing “Site Map” for the title it’s showing the title for the very first post in my blog.

    The code I have on my page below the regular loop is:

    <?php
    $myposts = get_posts('numberposts=20');
    foreach($myposts as $post) : ?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    <?php endforeach; ?>

    Perhaps I need to manually reset the loop at the bottom of my template file?

Viewing 1 replies (of 1 total)
  • Thread Starter Tim Bowen

    (@creativeslice)

    This bug was with the “Force rewrite titles” feature. When that box was checked AND my template title was set to wp_title('') this problem occurred.

    I simply unchecked the box and it’s fixed.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] Titles from query, not page title’ is closed to new replies.