Forums

[resolved] Number of blog posts showing for a single category (3 posts)

  1. auxano
    Member
    Posted 2 years ago #

    Site in question: http://auxanocreative.com/pat/columns/

    I'm using the following code to display the posts for this category on this page only:

    <?php
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("cat=5&paged=$page");

    global $more;
    // set $more to 0 in order to only get the first part of the post
    $more = 0;
    ?>

    I'm using something similar to show posts in a single category on "The Dog" Journal page as well.

    I want to show only ONE post on the Columns page and I want to show up to 10 posts on "The Dog" Journal page.

    Is it possible to add something to the above code to specify how many posts will show up on the page?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    http://codex.wordpress.org/Template_Tags/query_posts

    Look at the showposts parameter.

  3. auxano
    Member
    Posted 2 years ago #

    Thanks! I must have overlooked that before.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.