• Right now it appears that setting posts per page in the dashboard applies to both the front page and the archives. If I go to the dashboard I can set the number of posts you can see to one, which is great for my needs.

    The problem is that I don’t want people searching through the archives to only get one post per page.

    Is there a way to so X number of posts in the archives, but only one at a time on the index page?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m using Hemingway, and it can be done.

    In the WP control panel, under Options > Reading, set Blog Pages > Show at most # pages to your desired number (I’ve just set it to 10).

    As I’m using WP as a photoblog with the Hemingway theme, I like my index page to show only the most recent post.

    Here is the first few lines of my index.php

    ?php get_header(); ?>
    
    	<div id="primary" class="twocol-stories">
    		<div class="inside">
    			<?php
    				// Here is the call to only make two posts show up on the homepage REGARDLESS of your options in the control panel
    				query_posts('showposts=1');
    			?>
    			<?php if (have_posts()) : ?>
    				<?php $first = true; ?>
    				<?php while (have_posts()) : the_post(); ?>

    ………..

    The key line is ‘query_posts(‘showposts=1′);’

    Not sure what theme you’re using or how it is done outside of hemingway, but it’s how I’ve just managed to do it ??

    Traditionally, I’d suggest using the Custom Query String plugin. I see it just became “unsupported”… but is still there for download.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multiple posts in Archives but only one in Index’ is closed to new replies.