[Resolved] [Plugin: WordPress SEO by Yoast] Titles from query, not page title
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?
- The topic ‘[Resolved] [Plugin: WordPress SEO by Yoast] Titles from query, not page title’ is closed to new replies.