Show pagination in custom template
-
Hi, Thank you for your plugin.
I have a question about the pagination. I used a custom template to show eight event posts above the event calendar and I’d like to show all of the events no matter It was past. So, I created a query to retrieve it.
I tried:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $my_query = new WP_Query(array( 'post_type' => 'tribe_events', 'posts_per_page'=> 8, 'start_date' => "1990-01-01 00:00:00", 'paged' => $paged, ));
However, when I added the pagination code at the end of the wrapper. It didn’t work.
This is the theme pagination function.<?php gullu_pagination(); ?>
then I’ve tried the method refer to Here
<?php $args = array( 'base' => '%_%', 'format' => '?tribe_paged=%#%' ); ?> <?php echo paginate_links( $args ); ?>
and it also didn’t work.
Also, I’ve tried other coding like:
stackThe above method was able to show a arrow and link to next page, but there is nothing inside the second page… I have created nine demo events.
How can I retrieve all the events? Please give me some advice, thanks.
- The topic ‘Show pagination in custom template’ is closed to new replies.