• Resolved YOUAREtehSCENE

    (@youaretehscene)


    A recent user asked me in the chatbox

    ‘Any chance of getting more posts per page when browsing catergories?’

    Now, I’m assuming he means

    https://i50.tinypic.com/mil1rp.jpg

    Their are 39 posts for that band ‘Blink182’. I’m guessing he wants all 39 posts of that one band be shown on a single page when he uses the drop down menu. If this is true, which I do believe he wants, instead of using page after page. How would I go about doing this?

    Thanks
    -Dave

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    put this in your theme’s functions.php If you want to show all posts on category pages:

    function my_post_queries( $query ) {
      // not an admin page and is the main query
      if (!is_admin() && $query->is_main_query()){
        if(is_category()){
          $query->set('nopaging', 1);
        }
      }
    }
    add_action( 'pre_get_posts', 'my_post_queries' );

    You can set the number of posts in WP-Admin. It is at Reading section under Setting tab.

    Thread Starter YOUAREtehSCENE

    (@youaretehscene)

    @gidd: yeah I understand that. But, that’s for the front page. I have 30 posts to show. But, I was talking about when a user uses the drop down menu, and finds something, like i gave late last night, for the blink182 posts.

    Thread Starter YOUAREtehSCENE

    (@youaretehscene)

    SOLVED THANKS.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Showing More Posts When Using Categories’ is closed to new replies.