Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tkim1205

    (@tkim1205)

    Found the answer 🙂

    <div id="content">
    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
    <?php query_posts('posts_per_page=5&cat=4,16&paged=' . $paged); ?>
    <?php while (have_posts()) : the_post(); ?>
    <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    <p><?php the_excerpt(); ?></p>
    <?php endwhile; ?>
    </div>
    
    <div class="navigation">
    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
    else { ?>
    <div class="right"><?php next_posts_link('Next Page &raquo;') ?></div>
    <div class="left"><?php previous_posts_link('&laquo; Previous Page') ?></div>
    <?php } ?>
    </div>
    Thread Starter tkim1205

    (@tkim1205)

    Hi thanks for that reply!

    Yep i only want to show posts of cat id 4 and 16, however my issue is there is a total of about 20 posts, but only 10 posts show up on my page. There is no “next” button to retrieve the next 10.

Viewing 2 replies - 1 through 2 (of 2 total)