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

    (@keesiemeijer)

    Try it without the query_posts in your template and with this in your theme’s functions.php [untested]:

    function my_post_queries( $query ) {
      // not on admin pages and is the main query
      if (!is_admin() && $query->is_main_query()){
        if(is_category()){
          $mb_numbers = stripslashes(get_option('mb_numbers'));
          $query->set('posts_per_page', $mb_numbers);
        }
      }
    }
    add_action( 'pre_get_posts', 'my_post_queries' );

    Thread Starter gotmoney

    (@gotmoney)

    You are incredible.

    Thanks a ton! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Page 2 Category Query Not Working, Shows Page 1’ is closed to new replies.