admin管理员组

文章数量:1122846

all. I'm getting a "Page not found" message in my firefox tab when I click page 2 in my pagination menu. What's odd is, the content shows up just fine on all paginated pages. I've tried millions of times to change the permalink structure and equal times just saving the permalink structure hoping something would resolve, but it never does. Honestly, I'm not even sure which bits of code to paste for anyone to troubleshoot but I'll start how I imagined the flow:

On index.php, I have three "tabs" called [ALL] [ARIZONA WINE] [ARIZONA BEER]. ALL is simply a wp_query that culminates Arizona Wine and Arizona Beer in to one tab. Then Arizona Wine and Arizona Beer tabs are custom post types that display their respective content.

$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$args = array(
        'posts_per_page'    => 12,
        'orderby'           => 'rand',
        'post_type'         => array('arizona_wine', 'arizona_beer'),
        'paged'             => $paged
);
$cptposts = new WP_Query($args);

Then I'll call the paginated links as such:

$big = 999999999;
echo paginate_links( array(
        'base'      => str_replace( $big, '%#%', get_pagenum_link( $big ) ),
        'format'    => '?paged=%#%',
        'current'   => max( 1, get_query_var('paged') ),
        'total'     => $cptposts->max_num_pages,
        'prev_text' => __('Back'),
        'next_text' => __('Next'),
) );

Like, I feel the above code is pretty straight forward but I must have something wrong and any help would be super appreciated.

Thanks in advance, everyone!

本文标签: custom post typesquotPage not foundquot while on page 2 from pagination menu