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

Brittany Cerra
Brittany Cerra
7,424 Points

Question regarding argument in $pageTitle = wp_title( ' ', FALSE)

When storing the title in this variable, why are the empty parentheses necessary? Why wouldn't (FALSE) work alone as the argument?

1 Answer

Colin Marshall
Colin Marshall
32,861 Points

Check out the WordPress codex on wp_title @ http://codex.wordpress.org/Function_Reference/wp_title

There are 3 possible parameters for wp_title(); and they are $sep, $display, $seplocation.

$sep default value is '»' so setting it to '' gets rid of it the double arrows before the title.

"» Title of Post" is how it would look by default. "Title of Post" is how it is if you set $sep to be empty quotes.

EDIT: They're not empty quotes, there's a space inside the quotes. So there's a space before the title.

Brittany Cerra
Brittany Cerra
7,424 Points

Got it! Thanks, Colin :) I appreciate it!