Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Cynthia (Sunni) Freyer
Cynthia (Sunni) Freyer
828 Points

WP_title output when using SEO Yoast

Just sharing. :-)

When wp_title ( ' ' ) is output from home.php, it unexpectedly displays both the title of the blog listing page as well as the site title, when the SEO by Yoast plugin is used.

If you disable SEO by Yoast, it will display, correctly, only the title of the blog listing page.

The solution is to go into the header.php file and modify the wp_title from wp_title( ) to wp_title( ' ' ) . Unfortunately this concurrently changes the title in the tab of the browser also.

Need a conditional php line of code to display as originally expected. Not a PHP expert, so if anyone has that code, I'd love to know. In the interim, googling for an answer...