Support » Themes and Templates » Over-riding the master setting on posts per page

  • What is it that controls the number of posts on a page? I’m not talking about the front page. I mean an arbitrary page, like say, a custom tag page.

    I have one now that I want to show about 50 or more headlines on. But it only will show 14… presumably because that is what the master setting says on the generic wordpress settings screen under “Blog pages show at most… X posts”

    However for my special page, i want to over-ride this. How can I do it?

    The relevant code is here:

    <?php $posts = query_posts( $query_string . '&orderby=date&order=asc' ); ?>
    <ol><?php while (have_posts()) : the_post(); ?>
    		<li><h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4></li>
    		<?php endwhile; ?>
Viewing 1 replies (of 1 total)
  • try this

    <?php $posts = query_posts( $query_string . '&orderby=date&order=asc&posts_per_page=50' ); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Over-riding the master setting on posts per page’ is closed to new replies.