I’m having some problems with limiting how many posts I see in a particualr place. There’s lots of discussion on the forums and in other places about it but thus far nothing I’ve tried has worked.
What I’m doing is as follows.
Wordpress is running as a “news blog” on http://example.com/news/ but I want particular articles to appear in a small section of the main page at http://example.com/
I extracted the pre-requisite parts from the standard WP index and put them on the main page in the place where I wanted them and everything displays wonderfully, except when I try to limit the number of posts appearing on the sites main page. Nothing seems to work.
<?php get_calendar(); ?>
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
<h3>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></h3>
<?php the_time("d M y @ H:i"); ?>
endforeach; else: ?>
<?php _e('Sorry, no posts matched your criteria.'); ?>
<?php endif; ?>
Above are the bits I extracted from the standard index page and included on the main page to display everything. I’ve thus far tries all the variants of limiting posts that I can find but with no success.
Any help or guidance appreciated. Do I need to include more of the WP code on the sites main page to get hte limiting to work?
- The topic ‘Limiting Number of Posts’ is closed to new replies.