WordPress.org

Forums

Number of Posts (4 posts)

  1. eVilwayz
    Member
    Posted 11 years ago #

    I was wondering is there a way to specify within the template how many posts to display.
    I want my main page to display the usual 20 posts, but what I'm trying to do is have a seperate archive page which would display the date, post title (as a link to that post) and the author name on one page, every post being displayed.
    Any help would be greatly appreciated.

  2. Mike Little
    Member
    Posted 11 years ago #

    On the admin pages got to
    Options->Other Options (it's the first one)
    The first setting is posts_per_page.
    WordPress uses that value to determine how many posts to display on you main template.
    Mike

  3. eVilwayz
    Member
    Posted 11 years ago #

    Sorry - didn't make myself clear.
    I'm looking to have a secondary page as an archive page, displayng a different number of posts then my main blog page, with the author, date and title. any way I can achive this?

  4. olli_t
    Member
    Posted 11 years ago #

    simply put "$posts_per_page = 80;" (without quotes) on your archive page. as you can see below, i've just put that line below "$blog = 1;". i don't know if this is a good way to achive that, but it works for me.
    <?php /* Don't remove these lines, they call the b2 function files ! */
    $blog = 1;
    $posts_per_page = 80;
    require_once('blog.header.php');
    require_once($abspath.'wp-links/links.php');
    // not on by default: require_once($abspath.'wp-links/links.weblogs.com.php');

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.