This question already has an answer here:
- Pagination not working with custom loop 3 answers
I have a page named "calientes" with a complex loop that's working perfectly. This page is located at domain.com/calientes/. Now I need to use this page as the home page, so I went to "Settings -> Reading" and chose that page as static page.
The problem now is that the pagination no longer works. On the actual page it shows like domain.com/calientes/page/2 and it work perfectly! but now it shows as domain.com/page/2/ when i really want to go to domain.com/calientes/page/2
I didn't do any other changes, just chose that page as front page basically.
What can i do to made my pagination call domain.com/calientes/page/2?
This is my query on my page "Calientes" :
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; $args = array( 'posts_per_page' => 9, 'paged' => $paged, 'meta_query' => array( array( 'key' => '_wti_like_count', 'value' => 10, 'compare' => '>=', 'type' => 'numeric' ) ) ); $wp_query = new WP_Query(); $wp_query->query( $args ); if( have_posts() ) : ?> <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php comments_template( '', true ); ?> <?php endwhile; // end of the loop. ?> <?php twentytwelve_content_nav( 'nav-below' ); ?>