Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter synthi100

    (@synthi100)

    This is the code in my index.php file. The code to output my posts is in a different file because I also need it for a load more ajax call, but I suppose that the code to output the posts is not necessary for this issue.

    code in pastebin

    Thread Starter synthi100

    (@synthi100)

    Thanks for you reply.
    I tested it like this but the result is still 94.

    both

    $args = array('posts_per_page' => 7, 'paged' => $current_page,'category' => $category_id, 'post_type' => 'post', 'suppress_filters' => false);
    $postslist = new WP_Query( $args );
    die ($postslist->max_num_pages);

    (with category in the args array)
    and

    $args = array('posts_per_page' => 7, 'paged' => $current_page, 'post_type' => 'post', 'suppress_filters' => false);
    $postslist = new WP_Query( $args );
    die ($postslist->max_num_pages);

    (without category in the args array)
    show 94 on the page.

Viewing 2 replies - 1 through 2 (of 2 total)