• ferencpasschier

    (@ferencpasschier)


    Dear all,

    This is a loop I use to show posts, but i want to add a button to show 10 more and below another button “show more” and if pressed it shows another 10 posts.. how do i get this done? There are plugins but they dont work with these loops…

    <?php query_posts( ‘posts_per_page=10&orderby=post_date&order=desc&offset=5’ ); ?>

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <article id=”post-<?php the_ID(); ?>” class=”tile more-news-item”>
    <div class=”thumbnail”>
    ” alt=”<?php the_title(); ?>”><?php the_post_thumbnail(‘thumbnail’, array(‘title’ => ”)); ?>
    </div><!– / .thumbnail –>

    <div class=”info”>
    <h3>” alt=”<?php the_title(); ?>”><?php the_title(); ?></h3>
    </div><!– / .info –>

    <div class=”clear”></div>
    </article><!– / #post-<?php the_ID(); ?> .tile .more-news-item –>

    <?php endwhile; endif; ?>

    <?php wp_reset_query(); ?>

The topic ‘Show more button on a loop’ is closed to new replies.