Can find how to paginate myself in template
-
Hello.
When usingEM_Calendar::output( $args )
in a template file, the plugins generate a list of event with pagination, etc…
But I want to customise my list so I used$listEvents = EM_Events::get( $args );
and then make a foreach loop, no problem there.
My arguments are: `$args = array(‘owner’ => false,
‘pagination’ => 1,
‘ajax’ => false,
‘orderby’ => ‘event_start_date,event_start_time,event_name’ ,
‘order’ => ‘ASC’ ,
‘scope’ => ‘future’ ,
‘limit’ => ‘9’,
);`
But how can I paginate, I can’t find any exemple in the code or the templates…Here is my loop also:
foreach ($listEvents as $event): ?> <div class="column column-block"> <article id="post-<?php echo $event->post_id; ?>" class="boutique text-center"> <header> <?php if($event->image_url) $imageurl = $event->image_url; else $imageurl = get_field('image_par_defaut_pour_les_nouvelles','option')['sizes']['large']; ?> <a href="<?php echo get_permalink($event->post_id);?>"> <img class="featured-thumb" src="<?php echo $imageurl;?>" alt="<?php echo $event->event_name;?>"/> </a> <h3 class="entry-title"><a href="<?php echo get_permalink($event->post_id);?>"><?php echo $event->event_name; ?></a></h3> </header> </article> </div> <?php endforeach; ?>
Thanks for your time.
- The topic ‘Can find how to paginate myself in template’ is closed to new replies.