limiting recent posts on homepage
-
I’d like my homepage to display less recent posts than the rest of the pages on my site. So I’d like to set the # posts that display in my category archives to 30, let’s say, but limit the number to 15 on my homepage. Here is the code from the main index template:
<!-- BEGIN recent posts --> <div class="cbox"> <h2><?php fs_lang("Recent Articles"); ?></h2> <?php $wp_query = $tmp_query; if (have_posts()) : $count = 0; ?> <ul> <?php while (have_posts()) : the_post(); $count++; ?> <li<?php if ($count==1) echo ' class="first"'; ?>> <a class="attachment" href="<?php the_permalink(); ?>"><?php fs_attachment_image($post->ID, 'thumbnail', 'alt="' . $post->post_title . '"'); ?></a> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <p><?php echo fs_clean($post->post_excerpt, 177); ?>...</p> </li> <?php endwhile; ?> </ul> <?php else: ?> <p><?php fs_lang("No articles."); ?></p> <?php endif; ?> <!-- END recent posts -->
Can anyone tell me how to limit the # posts here?
Thanks!
[moderated–bump removed. Please refrain from bumping as per Forum Rules]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘limiting recent posts on homepage’ is closed to new replies.