WordPress.org

Ready to get started?Download WordPress

Forums

Over-riding the master setting on posts per page (2 posts)

  1. nickaster
    Member
    Posted 2 years ago #

    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; ?>
    </ol>
  2. stvwlf
    Member
    Posted 2 years ago #

    try this

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.