Forums

Display 1 post on home page but multiple posts in archive (3 posts)

  1. dissata
    Member
    Posted 2 years ago #

    I am trying to set up my site so that the front page displays only the most recent post, while the archives display a list of 10 or so (with an 'older posts' button).

    My problem is that when I set my blog to display only 1 post per page, this applies also to the archive pages.

    Is there a way to modify the theme code (either index.php or archive.php) so that I can display only 1 post on the main page, but still display multiple posts on my archive/search pages?

  2. dissata
    Member
    Posted 2 years ago #

    probably should give you some relevant info:

    theme: inove

    website: http://www.ben-mullikin.com

  3. esmi
    Theme Diva & Mod
    Posted 2 years ago #

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

    Something like:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'posts_per_pag' => 1,
    	'paged' => $paged
    );
    query_posts($args);
    ?>

    should do it.

Topic Closed

This topic has been closed to new replies.

About this Topic