Ready to get started?Download WordPress


Why is my pagination for custom post type not working? (1 post)

  1. tilleyt88
    Posted 1 year ago #

    Here is the code I'm using to display the pagination...

    global $wp_query;
    $big = 999999999; // need an unlikely integer
    echo paginate_links( array(
    'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
    'format' => '?paged=%#%',
    'current' => max( 1, get_query_var('paged') ),
    'total' => $wp_query->max_num_pages
    ) );

    But when you click next and got to /page/2/ it says "Page Not Found"

    what am I doing wrong???

    Thanks :)


Topic Closed

This topic has been closed to new replies.

About this Topic