Support

Home Forums Event Espresso Premium Add Navigation (Previous/Next) Links to Single Event Post

Add Navigation (Previous/Next) Links to Single Event Post

Posted: October 17, 2016 at 8:06 pm


WDesignGroup

October 17, 2016 at 8:06 pm

Hello, I would like to add simple previous/next event links to the bottom of single event posts. I came across this link (https://gist.github.com/lorenzocaum/becd3ffbeb4c344ff444) which would do exactly as I want, however it doesn’t seem to work for me. I’ve tried inserting the code into my functions.php file and when that didn’t work I created a plugin. Both unsuccessful.

My theme allows me to create post navigation, however the date of the post is dictating the order of the links where I really want the date of the event to be the factor which determines the order.

Here is a link to a single post on the website: http://www.greytowers.org/events/halloween-dramatic-reading/

Thank you!


Josh

  • Support Staff

October 18, 2016 at 9:21 am

Hi there,

The above code does not work, please see this fork:

https://gist.github.com/joshfeck/dd973689274dd58ed34a05fc9fb8fa3e

See also this other gist that shows how to change the order of the next/previous event links so they sort by the event’s primary date time:

https://gist.github.com/joshfeck/a8e28b9cfecd89308fbea4c152f546c9

The support post ‘Add Navigation (Previous/Next) Links to Single Event Post’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso