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 WordPress Theme Development Finishing Your WordPress Theme Testing Your WordPress Theme

How to get space between wp_title(); bloginfo( 'name' ); ?

In the demo there is About then a space and then the title of the website. But I get something different. My site title is WP local so I get: AboutWP local. It should be About WP local.

I can't find the error. Looking for the solution.

3 Answers

Cindy Lea
PLUS
Cindy Lea
Courses Plus Student 6,497 Points

It sounds like you need to add a space to a variable some where. I dont see your code so thats my guess.

I thought the same. Can't find the variable yet. But I'll mark it as best answer.

Shane Oliver
Shane Oliver
19,977 Points

You need to pass the separator parameters in the call to wp_title

wp_title( '|', true, 'right' ); // results in the title - page name | blog name

Thank you. Yes, I've done that now. But my question was before that task. when I just have the wp_title() ; and bloginfo(); that doesn't output a space. e.g. aboutWP is what I get, while in the video it outputs as about WP.

Robert Bepko
Robert Bepko
2,837 Points
<title><?php wp_title(' ', true, 'right'); bloginfo( 'name' );  ?></title>

Cheers