Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Forked from lorenzocaum/new_gist_file.md
Last active October 18, 2016 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshfeck/dd973689274dd58ed34a05fc9fb8fa3e to your computer and use it in GitHub Desktop.
Save joshfeck/dd973689274dd58ed34a05fc9fb8fa3e to your computer and use it in GitHub Desktop.
Add a previous event and next event link to the end of the single event pages in Event Espresso 4
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
//* Add a previous event and next event link to single event pages in Event Espresso 4
function ee_previous_event_next_event_navigation(){
?>
<div class="ee-after-event-navigation ee-clearfix">
<div class="ee-after-event-navigation-previous" style="float:left"><?php previous_post_link('&laquo; %link', 'Previous Event: %title'); ?></div>
<div class="ee-after-event-navigation-next" style="float:right"><?php next_post_link('%link &raquo; ', 'Next Event: %title'); ?></div>
</div>
<?php
}
add_action( 'AHEE_event_details_after_post', 'ee_previous_event_next_event_navigation' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment