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
Post a Comment