Php Wordpress:如何获取当前页面的名称
如果我当前的url是www.example.com/thank-you,我如何以wordpress方式呼出页面名称。wordpress方式:Php Wordpress:如何获取当前页面的名称,php,wordpress,Php,Wordpress,如果我当前的url是www.example.com/thank-you,我如何以wordpress方式呼出页面名称。wordpress方式: echo $post->post_name; 正常方式:(也应在WP中工作) 我怀疑$\u服务器['PHP\u SELF']将返回任何看起来像www.example.com/thank-you或/thank-you echo $_SERVER['PHP_SELF'];
echo $post->post_name;
正常方式:(也应在WP中工作)
我怀疑
$\u服务器['PHP\u SELF']
将返回任何看起来像www.example.com/thank-you
或/thank-you
echo $_SERVER['PHP_SELF'];