小编Mil*_*lan的帖子

如何获取页面模板名称?例如模板名称:模板名称

有没有办法获取页面模板的名称?
我的意思是在页面模板中,我们在开头写Template Name: template name
I Want " template name" by page-id

我已经尝试过get_post_meta(get_the_ID(), '_wp_page_template', true) and get_page_template_slug($post_id),但没有任何功能有帮助

php wordpress

5
推荐指数
2
解决办法
1万
查看次数

标签 统计

php ×1

wordpress ×1