[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:
/category/calendar/upcoming/to:
/category/calendar/past/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>« Previous Events</span>' ); ?> <?php elseif( events_displaying_upcoming() && !get_previous_posts_link( ) ) : ?> <a href='<?php echo events_get_past_link(); ?>'><span>« Previous Events</span></a> <?php elseif( events_displaying_past() && get_next_posts_link( ) ) : ?> <?php next_posts_link( '<span>« Previous Events</span>' ); ?> <?php endif; ?> </div> <div class="nav-next"><?php // Display Next Page Navigation if( events_displaying_upcoming() && get_next_posts_link( ) ) : ?> <?php next_posts_link( '<span>Next Events »</span>' ); ?> <?php elseif( events_displaying_past() && get_previous_posts_link( ) ) : ?> <?php previous_posts_link( '<span>Next Events »</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 »</span></a> <?php endif; ?> </div>
suggestions? you can see the plugin/site in action here: https://sideout.230.ca/category/calendar/
any suggestions?
- The topic ‘[Plugin: The Events Calendar] List View Pagination Not Working’ is closed to new replies.