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,484 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,949 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