WP_Query help
-
on this page i’m using the code below to show the 25 most recent posts from category 4.
<?php $custom_query = new WP_Query( 'posts_per_page=25&cat=4' ); if ( $custom_query->have_posts() ) : while ( $custom_query->have_posts() ) : $custom_query->the_post(); ?> <h3><?php the_title(); ?></h3> <h6><?php the_time('F j, Y') ?></h6> <?php the_content(); ?> <hr class="homenews" /> <?php previous_posts_link('? Older Entries', 0) ?> <?php endwhile; else : ?> <h3>Sorry...</h3> <p>No posts were found.</p> <?php endif; ?>
i thought this line of code
<?php previous_posts_link('? Older Entries', 0) ?>
would add a link to the bottom of the page that shows a link to previous entries but for some reason the link does not appear.please advise how I can get it to show. thanks in advance
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘WP_Query help’ is closed to new replies.