limiting number of posts on homepage only
-
Hello,
I’m trying to limit the number of posts on the home page, but it doesn’t seem to be working. It is showing 5, and I want it to show 3. I have 3 set up in the Reading settings. Is it because two of the posts are sticky posts? On my other blog category pages it is showing many more posts.
Or do I have to insert special code on the homepage? I’ve tried some coing I’ve found on the forums but they didn’t work.
Here is the index.page loop:
<div id="content" class="narrowcolumn blog" role="main"> <?php while (have_posts()) : the_post(); ?> <div <?php post_class() ?>> <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <div class="entry"> <?php the_excerpt(); ?> </div> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Posts') ?></div> <div class="alignright"><?php previous_posts_link('Newer Posts »') ?></div> </div> <?php endif; ?> </div>
Thanks.
- The topic ‘limiting number of posts on homepage only’ is closed to new replies.