Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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!