WordPress.org

Support

Support » Themes and Templates » Problems with pagination and custom post types

Problems with pagination and custom post types

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi James,

    Try making it so all the page links appear as so

    http://localhost/clients/win/category/listings/photographers?paged=%page%

    get_query_var('paged') ? get_query_var('paged') : 1

    This part of the code is checking for the paged variable within the WP_Query class, which is essentially $_GET[‘paged’] (and maybe $_POST[‘paged’]), so because the variable isn’t set, it’s defaulting to 1 which is why the first page works, but the rest of the pages are being parsed by WP as part of the post URL.

    I’m afraid that didn’t solve it Ollie, thanks for your reply though.

    I am having the same issue with Custom Post Types and PageNavi. Except my pagenavi is not counting the number of posts in my Post Type. It continually says Page 1 of 1 when i have 20 posts.

    I’ve placed the code after the loop in the single.php template (named getting-started-T1.php) and before the endif… also tried after the endif… neither one worked.

    Anyone have this problem?
    Need major help! Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problems with pagination and custom post types’ is closed to new replies.
Skip to toolbar