Wordpress 如何在WP Post template插件中默认检查自定义模板中的帖子
我使用可湿性粉剂后模板后模板 我有两个模板Wordpress 如何在WP Post template插件中默认检查自定义模板中的帖子,wordpress,wordpress-theming,Wordpress,Wordpress Theming,我使用可湿性粉剂后模板后模板 我有两个模板 默认模板(默认选中) 财产 我想要 默认模板 属性(默认情况下选择) 您需要将代码更改为page.php文件。在同一文件中查找以下代码 while ( have_posts() ) : the_post(); get_template_part( 'template-parts/page/content', 'page' ); // If comments are open or we have at l
- 默认模板(默认选中)
- 财产
- 默认模板
- 属性(默认情况下选择)
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/page/content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
endwhile; // End of the loop.
请更改get_-template_-part('template-parts/page/content','page')代码>此行带有
get_template_part( 'inc/template', 'property' );
为此,您需要设置模板文件名为template property.php您尝试了什么?你能用代码在这里发布这两个模板吗?这篇文章很有用吗?实际上,我希望代码将其默认设置为属性模板,而不是像这样