[Support request] How to increase post snippets on a category page?

Home Forums Support How to increase post snippets on a category page?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1035101
    Norman

    Where do I select how many post snippets to display on a category page? Right now, there are 8, but I want to increase that.

    #1035160
    David
    Staff
    Customer Support

    Hi there,

    you set the number of posts to display in Dashboard > Settings > Reading.

    If you want to change just the archives and not the main blog page then it requires PHP like so:

    function number_of_posts_on_archive($query){
        if ($query->is_archive) {
                $query->set('posts_per_page', 15);
       }
        return $query;
    }
     
    add_filter('pre_get_posts', 'number_of_posts_on_archive');
    #1035545
    Norman

    Thanks David!

    I should have known the settings, but since I hadn’t changed it in a long time, it wasn’t so obvious.

    #1035582
    David
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.