paged query leads to 404? [duplicate]

A couple of points you should try out: Remove the ‘paged’ => $loop->query_vars[‘paged’] from your $pagination array. It’s not a parameter in the docs. Remove the ‘base’ => @add_query_arg(‘paged’,’%#%’) from your $pagination array. I believe WordPress catches the paged parameter using the default page parameter. Which is it’s default. Here are the docs for the … Read more

Pagination not working in secondary query

The solution: <?php // building query $zephyr_cat = get_post_meta($post->ID, ‘zephyr_category’, true); $paged = is_front_page() ? get_query_var( ‘page’ ) : get_query_var( ‘paged’ ); if ( $zephyr_cat == 0 ) { $zephyr_q = new WP_query(‘posts_per_page=”.get_option(“posts_per_page’) . ‘&paged=’ . $paged); } else { $zephyr_q = new WP_query(‘cat=”.$zephyr_cat . “&paged=’ . $paged); } The explanation: the previous code was … Read more