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 How to Build a WordPress Theme Preparing to Code WordPress Templates Adding Titles and Meta Tags

Dominic Ho
Dominic Ho
8,256 Points

Why does my wp_title() also displays the name of the site?

For some reason the wp_title() alone already displays the name of the site, and when I add in the bloginfo('name') line, the name of the site duplicates.

Does this means I don't actually need the bloginfo('name') line, or am I doing something wrong here...? I have all the required plugins installed but nothing more.

1 Answer

hey there, wp_title() will pull the title of the page or post specifically set in the post/page editing area, and bloginfo('name') shows the website's title set in your admin under General. They are two different and separate elements in the database.

hope that helps!