javascript - How to create multiple Load More buttons on a page (WordPress) -


i have experimented plugins , tutorials, tutorial available deal infinite load, adaptations of ajax load more button, or not relevant wordpress sites, , these not useful question.

what hope achieve set of rows load more buttons. example:

row 1 (3 posts cat=1)

[load more]

row 2 (3 posts cat=2)

[load more]

where each load more press loads 6 more category.

the code have 3 post rows is:

   <div class="container">       <?php $posts = get_posts( "cat=1&numberposts=3" ); ?>       <?php if( $posts ) : ?>       <?php foreach( $posts $post ) : setup_postdata( $post ); ?>       <?php $column = ($column == '') ? 'first' : (($column == 'first') ? 'middle' : (($column == 'middle') ? 'last' : 'first' )); ?>       <div class="post <?php echo $column; ?>" id="post-<?php the_id(); ?>" >          <a href="<?php echo get_permalink($post->id); ?>" >          <h3><?php echo $post->post_title; ?></a></h3>          <?php if ( has_post_thumbnail()) : the_post_thumbnail('columner-thumb'); endif; ?>       </div>       <?php endforeach; ?>       <?php endif; ?>    </div> 

is there way add code load more button display more category?

thank on javascript question.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -