I'm working on a WP_Query using the Modern Tribe Events Calendar
My problem is with pagination.
Is this the incorrect way to paginate the WP_Query or could there be another method for paginating the Events Calendar?
I found a tutorial that uses the WPNavi plugin but I would like use core wordpress functions.
<?php
$upcoming = new WP_Query();
$upcoming->query( array(
'post_type'=> 'tribe_events',
'eventDisplay' => 'upcoming',
'posts_per_page' => 1)
);
if ($upcoming->have_posts()) : while ($upcoming->have_posts()) : $upcoming->the_post(); ?>
<?php tribe_get_template_part( 'list/single', 'event' ) ?>
<?php endwhile;
else :
echo 'no upcoming events';
endif;
wp_reset_query();
?>
<div class="navigation"><p><?php posts_nav_link(); ?></p></div>