admin管理员组文章数量:1420174
I am trying to make a Wordpress theme. In my theme, there are multiple post formats and all are rendered on the index.php
something like this website www.theoutline
It has a 1st section with single and as you scroll it has more than one post on other section and the same format goes on till the end of the page. Here I am confused about how to achieve this. Do I need to make another query for them or is there any other way.
Please let me know if there is any way to do this.
I am query posts like this.
<?php
if(have_posts()): ?>
<div class="row">
<?php while(have_posts()): the_post(); ?>
<?php get_template_part('template-parts/content', get_post_format());?>
<?php endwhile;wp_reset_postdata(); ?>
</div>
<?php else: ?>
<?php get_template_part('/template-parts/content', 'none');?>
<?php endif
?>
本文标签: phpHow can I render more than multiple posts on templateparts with post formats
版权声明:本文标题:php - How can I render more than multiple posts on template-parts with post formats 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745313635a2653051.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论