开发者

Wordpress: How do I get the current name of my page

开发者 https://www.devze.com 2022-12-22 06:12 出处:网络
If my current url is www.example.com/thank-you, how d开发者_如何学编程o I echo out the page name in a wordpress way.WordPress Way:

If my current url is www.example.com/thank-you, how d开发者_如何学编程o I echo out the page name in a wordpress way.


WordPress Way:

echo $post->post_name;

Normal Way: (Should work in WP too)

echo  $_SERVER['PHP_SELF'];
0

精彩评论

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