每个人所以我创建了一个博客主题the_excerpt()
在里面content.php
我的index.php 为不同类型的帖子格式显示不同的帖子摘录。我有content-gallery.php, content-audio.php, 等等,我在每一个the_excerpt()
而不是the_content()
. 如果我把the_content()
而且在“阅读更多”标签之前有很多文本,它打破了布局,因为设计是针对每篇文章的小片段进行的。
这是否意味着我不能使用get_template_part( \'content\', get_post_format() )
在里面single.php, 因为它将返回摘录而不是全部内容?
在content.php, 我可以说:
if( is_singular() ) {
the_content();
}
或创建子页面single.php 喜欢single-gallery.php.使用时,排列层次结构的正确方式是什么the_excerpt()
在里面content-{post-type}.php?