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
版权声明:本文标题:custom post types - "Page not found" while on page 2 from pagination menu 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736302095a1931411.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论