admin管理员组文章数量:1244439
Trying to avoid pagination on the blogs page, I'm getting a layout based on fallback to basic post display. This is like infinite scroll but I get only 10 posts in next page with the load more p
My entire block theme folder is 11kb. It has just one index.html in the /templates and header, footer in the /parts.
How can I improve the page layout for posts appearing after load more button is clicked.
if ($query->have_posts()) {
while ($query->have_posts()) {
$query->the_post();
// First try theme's content template
$template = locate_template('template-parts/content.php');
if ($template) {
get_template_part('template-parts/content');
} else {
// Fallback to basic post display
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title('<h2 class="entry-title"><a href="' . esc_url(get_permalink()) . '">', '</a></h2>'); ?>
</header>
<div class="entry-content">
<?php the_excerpt(); ?>
</div>
</article>
<?php
}
}
本文标签: infinite scrolllayout issue after load more for posts
版权声明:本文标题:infinite scroll - layout issue after load more for posts 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740222219a2244031.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论