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

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!