Pagination link is not working /page/2 - NOT FOUND - Wordpress
Go to admin Dashboard then Settings->Reading
then set Blog pages show at most
is equal to you query posts_per_page
. So in your query if you set posts_per_page => 2
then Blog pages show at most
will be 2
This is what I found and resolved the issue I had!
[...] I needed to go into the wp-admin page (the wordpress dashboard) and go to Settings then Reading and in the "Blog pages show at most" field I changed the value from '10' to '6' (the number of posts I indicated in
$wp_query->query('showposts=6&cat=1'.'&paged='.$paged);
)
use following paged query
if ( get_query_var('paged') ) { $paged = get_query_var('paged'); }elseif ( get_query_var('page') ) { $paged = get_query_var('page'); }else { $paged = 1; } $produtos = new WP_Query(array( 'post_type' => 'blog', 'posts_per_page' => -1, 'orderby' => 'date', 'order' => 'asc', 'paged' => $paged, 'tax_query' => array( array( 'taxonomy' => 'categorias', 'field' => 'slug', 'terms' => ACTIVE ) ) )); while ( $produtos->have_posts() ) : $produtos->the_post(); //CONTENT endwhile; echo get_pagination($produtos);