Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Pagination on homepage redirecting to root URL

@shanebp

Moderator

You shouldn’t call the main query and then change it and call it again.
Besides being inefficient, it can lead to other problems.
Try:

$args = array(
     'post_type'      => 'leaning_bikes',
     'paged'          => $paged,
     'posts_per_page' => 6
);
$wp_query = new WP_Query( $args );

while ($wp_query->have_posts()) : $wp_query->the_post();
Skip to toolbar