Wordpress 模板内的页面标题?

Wordpress 模板内的页面标题?,wordpress,page-title,Wordpress,Page Title,有没有办法通过我的模板获取我的页面标题,例如这样的一行 get page_title() 在我的模板中,这将按照仪表板中每个页面上的定义提取该页面的标题?使用以下一个来获取页面标题: <?php the_title();?> 杰出的谢谢,我知道这很简单,但我是wordpress的新手,找不到任何参考资料。非常感谢!!:)-如果我想在我的模板中有一个具有唯一内容的侧栏,我可以有一个带有if循环的页面ie:sidebar.php,例如:if$page_title=index{incl

有没有办法通过我的模板获取我的页面标题,例如这样的一行

get page_title()

在我的模板中,这将按照仪表板中每个页面上的定义提取该页面的标题?

使用以下一个来获取页面标题:

<?php the_title();?>

杰出的谢谢,我知道这很简单,但我是wordpress的新手,找不到任何参考资料。非常感谢!!:)-如果我想在我的模板中有一个具有唯一内容的侧栏,我可以有一个带有if循环的页面ie:sidebar.php,例如:if$page_title=index{include(sidebar01.php)}else如果$page_title=page02{include(sidebar02)}else{include sidebar03}您可以根据自己的要求创建自定义侧栏。
$page_title = $wp_query->post->post_title;

Check for reference: http://codex.wordpress.org/Function_Reference/WP_Query#Properties.