- This topic has 5 replies, 2 voices, and was last updated 7 years, 11 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › Pagination of Single Events
Tagged: pagination single-event
Hi,
Forgive me if this has been done before, I couldn’t find anything here in the forums.
I have a list of events:
http://www.lorenz-loesch.at/av/konzerte/programm-karten/
Now, when one of these events is clicked, I’d like to go to the Single Event Page, e.g.
http://www.lorenz-loesch.at/av/events/24/auftakt-im-palmenhaus-gmuend/
On this single event page, I would like to have Next / | Previous links to the next or previous event (independent of event category etc. just the next event by date).
Is this possible somehow? I couldn’t find anything to add in my template for single events.
I’m happy to do some coding in PHP as well, but it would be cool if someone could point me into the right direction.
Cheers,
Lorenz
Sorry, but that is currently not possible (previous/next is a concept, some want it by date, some by entry time or last change …)
Ok, thought so, but I’m sure this can be done with very little effort, like a query something along the lines of
SELECT * FROM events WHERE date > $dateOfCurrentEvent LIMIT 0
Can you point me to what tables I would have to query?
well, wp_eme_events is the default table name.
I advise you to use the function eme_get_events though:
function eme_get_events($o_limit=0, $scope = “future”, $order = “ASC”, $o_offset = 0, $location_id = “”, $category = “”, $author = “”, $contact_person = “”, $show_ongoing=1, $notcategory = “”, $show_recurrent_events_once=0, $extra_conditions = “”, $count=0) {
The var $extra_conditions can contain your sub-query (date > $dateOfCurrentEvent)
perfect, thanks a lot, I’ll play around with that tomorrow!
Btw, there’s an easier method: just use [eme_events] with a limit of 1 per page and pagination, and use a template that shows the event “listing” the way you want it for 1 event.