WordPress.org

Support

Support » How-To and Troubleshooting » page/2 redirects to 404

page/2 redirects to 404

  • teknoledge
    Member

    @teknoledge

    I have a strange thing going on in regards to posts pagination on category pages. I’m using this peace of code along with custom query:

    $totalposts = $wpdb->get_results($total, OBJECT);
    				$ppp = 15;
    				$wp_query->found_posts = count($totalposts);
    				$wp_query->max_num_pages = ceil($wp_query->found_posts / $ppp);
    				$on_page = intval(get_query_var('paged'));
    				if($on_page == 0){ $on_page = 1; }
    				$offset = ($on_page-1) * $ppp;

    When page 2 is called, e.g. /some-category/page/2 I get a redirect to 404 page. This all works well on my dev server thats using WP 2.7.1 but on my client server which is on WP 2.6.3 it doesnt!?

    Any help would be appreciated. Thanks.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘page/2 redirects to 404’ is closed to new replies.