Php 将wordpress标题放入变量中

Php 将wordpress标题放入变量中,php,wordpress,Php,Wordpress,你知道怎么做吗 $title=wp_title() 问题是wordpress会自动回显wp_title() 有什么想法吗 你看过Wordpress文档了吗? 就在这里: 像这样使用它: 其中,$echo为布尔值(真/假) $echo (布尔)(可选)回显标题(True)或返回标题作为PHP字符串使用(False) 你看过Wordpress文档了吗? 就在这里: 像这样使用它: 其中,$echo为布尔值(真/假) $echo (布尔)(可选)回显标题(True)或返回标题作为PHP字符串使

你知道怎么做吗

$title=wp_title()

问题是wordpress会自动回显
wp_title()


有什么想法吗

你看过Wordpress文档了吗? 就在这里:

像这样使用它:

其中,
$echo
为布尔值(真/假)

$echo (布尔)(可选)回显标题(True)或返回标题作为PHP字符串使用(False)


你看过Wordpress文档了吗? 就在这里:

像这样使用它:

其中,
$echo
为布尔值(真/假)

$echo (布尔)(可选)回显标题(True)或返回标题作为PHP字符串使用(False)

    Default: True 

    * 1 (True) - default
    * 0 (False) 
$title = wp_title('', 0);