Reputation: 193
I created a wordpress theme, in home page, as i see in another templates for fetch limit numbers of posts in home page. a code like belowe has been developed:
<?php
$featuredPosts->query('showposts=40');
while ($featuredPosts->have_posts() ) : $featuredPosts->the_post(); ?>
<!-- blah blah -->
<?php endwhile;?>
But it shows 35 posts in, how can i fix it? Does it depend on server speed?
Upvotes: 0
Views: 370
Reputation: 3238
Point 1: first check do you have 40 or more post
try that code
<?php query_posts("showposts=40"); ?>
or
<?php query_posts( 'posts_per_page=40' ); ?>
and check also in wp_admin panel Setting->Reading Sestting->Blog pages show at most
Upvotes: 0
Reputation: 1294
Are you sure there are more than 35 posts in the category you are querying? I think the query method you are using should be query_posts. A more standard conform loop would be:
<?php query_posts('showposts=40');
while (have_posts()) : the_post();
?>
Upvotes: 0
Reputation: 1043
Try this
$featuredPosts->query('posts_per_page=40');
showposts (int) - number of post to show per page. Deprecated as of WP Version 2.1 in favor of 'posts_per_page'.
Upvotes: 2