Reputation: 5831
Any idea how to make this work?
$title = wp_title();
The problem is wordpress automatically echoes the wp_title();
Any ideas?
Upvotes: 1
Views: 1859
Reputation: 20475
Have you even looked @ the Wordpress documentation? Its right here: http://codex.wordpress.org/Function_Reference/wp_title
use it like so:
<?php wp_title( $sep, $echo, $seplocation ); ?>
where $echo
is boolean (true/false)
$echo (boolean) (optional) Echo the title (True) or return the title for use as a PHP string (False).
Default: True
* 1 (True) - default
* 0 (False)
Upvotes: 7