尝试使用JetPack的Portfolio自定义内容类型和Underscores组合组件,但不完全确定是否正确加载了模板。显示哪个Wordpress模板和template_part文件用于构建页面?
是否有配置或插件将显示在浏览器中的Wordpress模板和template_part文件用于构建页面?
尝试使用JetPack的Portfolio自定义内容类型和Underscores组合组件,但不完全确定是否正确加载了模板。显示哪个Wordpress模板和template_part文件用于构建页面?
是否有配置或插件将显示在浏览器中的Wordpress模板和template_part文件用于构建页面?
尝试
<?php echo '<!-- ' . basename(get_page_template()) . ' -->'; ?>
footer.php
。
它使用get_page_template
转储模板名称在注释刻度内 - <!--
和-->
- 因此它在源代码中可见但在前端查看器中不可见。
或者使用
<?php get_current_template(true); ?>
如果你想让它在前端完全可见。
见https://developer.wordpress.org/reference/functions/is_page_template/
有一个插件,它提供的功能:https://wordpress.org/plugins/reveal-template/这一个提供了和许多其他调试信息:https://wordpress.org/plugins/debug-bar/