Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 23,840
- How-to & Troubleshooting
- 129,881
- Creating & Extending
- 25,910
- Requests & Feedback
- 9,553
- Third Party Plugins
- 9,834
- Showcase
- 3,316
- Ideas
- 1,402
- Miscellaneous
- 9,184
-
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();