Pagination Links
-
Hi,
I have created a custom events-list page using the following:
$events = EM_Events::get( array('scope' => 'future', 'limit' => 2, 'pagination'=> 1,) );?>
I am outputting the content as follows:
<?php foreach($events as $EM_Event){ $test = $EM_Event->post_id; $pageinfo = get_post( $test ); ?> <?php //print_r($EM_Event); ?> <div class="twocoloumn"> <?php if (has_post_thumbnail($EM_Event->post_id) ){ // $image = get_the_post_thumbnail($EM_Event->post_id, 'thumbnail'); echo $image; // } ?> <h1><?php echo $pageinfo->post_title; ?></h1> <?php $test2 = $EM_Event->post_content; echo nl2br($test2); ?> <p> </p> <div class="read-more"><p><a href="<?php echo get_permalink($test);?>">Read more </a></p><p><img src="<?php echo get_template_directory_uri(); ?>/images/arrow-blue-right.png" width="7px" class="arrow"></p></div> <div style="clear: both;"></div> </div> <?php if ($counter & 1) { // check if odd ?> <div class="two-coloumn-spacer"></div> <?php }?> <?php if ($counter % 2 == 0 ) { //is even ?> <div class="festival-spacer"> </div> <?php }?> <?php $counter ++; ?> <?php }?>
I have muddled my way through and the above works, but I would like to add pagination to the page and I don’t know how.
Can someone please help?
Much appreciated
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Pagination Links’ is closed to new replies.