post per page = -1 show nothing
-
I’m just building a site and I want to show the titles of all post of a category without paging. But if there more than 250 posts you see nothing only white.
Here the code I used:
<?php $posts = query_posts(‘cat=’.$cat.’&orderby=title&order=asc&posts_per_page=-1′); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<b><?php the_title(); ?></b><br>
….
If I set posts_per_page=250 all works fine. Is there any limit in the wordpress code or is this a server problem?Thanks for your help.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘post per page = -1 show nothing’ is closed to new replies.