Support » Plugins » [Plugin: The Events Calendar] List View Pagination Not Working

  • i’ve got a site and i’m using [Plugin: The Events Calendar] to generate both a list view and a grid view – the list view page works, but when i use the pagination code (unedited from the plugin), the URL goes from:


    i have more than 1 page of upcoming events, so i want it to show the second page of events, not the past (which there are none). the logic here seems like it could be wrong, but i’m not sure how:

    <div class="nav-previous"><?php
    	// Display Previous Page Navigation
    	if( events_displaying_upcoming() && get_previous_posts_link( ) ) : ?>
    		<?php previous_posts_link( '<span>&laquo; Previous Events</span>' ); ?>
    	<?php elseif( events_displaying_upcoming() && !get_previous_posts_link( ) ) : ?>
    		<a href='<?php echo events_get_past_link(); ?>'><span>&laquo; Previous Events</span></a>
    	<?php elseif( events_displaying_past() && get_next_posts_link( ) ) : ?>
    		<?php next_posts_link( '<span>&laquo; Previous Events</span>' ); ?>
    	<?php endif; ?>
    	<div class="nav-next"><?php
    	// Display Next Page Navigation
    	if( events_displaying_upcoming() && get_next_posts_link( ) ) : ?>
    		<?php next_posts_link( '<span>Next Events &raquo;</span>' ); ?>
    	<?php elseif( events_displaying_past() && get_previous_posts_link( ) ) : ?>
    		<?php previous_posts_link( '<span>Next Events &raquo;</span>' ); // a little confusing but in 'past view' to see newer events you want the previous page ?>
    	<?php elseif( events_displaying_past() && !get_previous_posts_link( ) ) : ?>
    		<a href='<?php echo events_get_upcoming_link(); ?>'><span>Next Events &raquo;</span></a>
    	<?php endif; ?>

    suggestions? you can see the plugin/site in action here:

    any suggestions?

  • The topic ‘[Plugin: The Events Calendar] List View Pagination Not Working’ is closed to new replies.