如何在wordpress中获取页面标题 [英] How to get page title in wordpress
本文介绍了如何在wordpress中获取页面标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗯,我试过了<?php echo get_the_title('关于我们');?>
但是代码不起作用.我正在使用 wordpress 4.1.这应该有效,但事实并非如此.wordpress 有更新功能吗?
But the code is not working. I am using wordpress 4.1. This should work but it isn't. Has wordpress updated the functions?
推荐答案
试试这个,可能对你有帮助
Try this one, It's may help you
<?php single_post_title(); ?>
谢谢:)
这篇关于如何在wordpress中获取页面标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文