Events Made Easy Forums How do I … Pagination of Single Events

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #55858
    Anonymous
    Inactive

    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

    #55860
    Franky
    Keymaster

    Sorry, but that is currently not possible (previous/next is a concept, some want it by date, some by entry time or last change …)

    #55864
    Anonymous
    Inactive

    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?

    #55868
    Franky
    Keymaster

    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)

    #55869
    Anonymous
    Inactive

    perfect, thanks a lot, I’ll play around with that tomorrow!

    #55872
    Franky
    Keymaster

    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.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top