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 trialroberthopman
16,502 PointsHow 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
Courses Plus Student 6,497 PointsIt sounds like you need to add a space to a variable some where. I dont see your code so thats my guess.
Shane Oliver
19,977 PointsYou need to pass the separator parameters in the call to wp_title
wp_title( '|', true, 'right' ); // results in the title - page name | blog name
roberthopman
16,502 PointsThank 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
2,837 Points<title><?php wp_title(' ', true, 'right'); bloginfo( 'name' ); ?></title>
Cheers
roberthopman
16,502 Pointsroberthopman
16,502 PointsI thought the same. Can't find the variable yet. But I'll mark it as best answer.