开发者

Put wordpress title inside variable

Any idea how to make this work?

$title = wp_title();

The problem is wordpress automatically echoes the wp_ti开发者_如何学运维tle();

Any ideas?


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) 


$title = wp_title('', 0);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜