Witam,
W jaki sposób zaimplementować lazy loading dla postów na blodu postawionym na Wordpressie?
Wywoływanie postów następuje poprzez:
<div class="container single-post-content">
<ul class="posts-list">
<?php the_content(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<li class="blog-page__post">
<a class="post__link" href="<?php the_permalink(); ?> ">
<div class="post__image-wrapper" style="background-image:url('<?php echo wp_get_attachment_url( get_post_thumbnail_id() );?>')">
</div>
<header class="post__header">
<div class="post_header-content">
<h4 class="post__title"><?php the_title(); ?></h4>
<?php the_excerpt(); ?>
</div>
</header>
<span class="post__date"><?php the_time('j F Y') ?></span>
</a>
</li>
<?php endwhile; ?>
<!-- post navigation -->
<?php else: ?>
<!-- no posts found -->
<?php endif; ?>
</ul>
</div>