• Resolved wrimomatt

    (@wrimomatt)


    I need the following code to not be limited to 10 posts. it’s a self-populating gallery thumbnails page and I need all posts to be visible.

    <?php $args = array('cat' => 6 ); $category_posts = new WP_Query($args); if($category_posts->have_posts()) : while($category_posts->have_posts()) : $category_posts->the_post();?>

Viewing 1 replies (of 1 total)
  • Thread Starter wrimomatt

    (@wrimomatt)

    well I’ll leave this up in case anyone else needs it solved. Good old Codex came through for me: Here’s what it’s supposed to look like.

    <?php $args = array('cat' => '6' , 'posts_per_page' => '-1' ); $category_posts = new WP_Query($args); if($category_posts->have_posts()) : while($category_posts->have_posts()) : $category_posts->the_post();?>

Viewing 1 replies (of 1 total)
  • The topic ‘how can I have unlimited posts?’ is closed to new replies.