• I am trying to overide the default posts per pages using ` $mquery = new WP_Query( array(‘category_name’=>$slug,’posts_per_page’ => 2, ‘paged’ => $paged));
    if ($mquery->have_posts()) : ?>`

    The problem is that it only works on the pages where total post divided by default post per page. The SQL LIMIT instead of being LIMIT 2, 2 on page 2 it becomes LIMIT 10,10 with a 404 redirect.

    NOTE: wp_reset_postdata() is not helping

  • The topic ‘Overiding default posts per page in categories’ is closed to new replies.