Single Event Previous/Next Navigation

Home Forums Calendar Products Events Calendar PRO Single Event Previous/Next Navigation

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #50857
    Michael
    Participant

    Hi, I’d like to display a separator between the previous event link and the next event link.
    The easiest way to do this is probably to check if a previous AND a next event exist – if yes, echo a slash. Simple. Can somebody point me in the right direction?
    Thanks

    #50859
    Michael
    Participant

    Oh – and I forgot: similarly, is there a way to exclude events that have passed, ie to only display a previous event link if the previous event is an upcoming event?

    #50986
    Barry
    Member

    Hi Michael.

    Regarding your first question you could try following the instructions in this snippet – and please familiarize yourself with our Themer’s Guide (link over on the right under Useful Resources) first of all, if you are unfamiliar with customizing The Events Calendar 🙂

    Similarly, is there a way to exclude events that have passed, ie to only display a previous event link if the previous event is an upcoming event?

    So that would be a littel more involved and I’d have to leave it to you to find a solution – you might find snippets for this or something similar to this on the forum or else you would need to look at the plugin’s code and adapt it to meet your own needs.

    Good luck!

    #51134
    Michael
    Participant

    Thanks, but the code in the snippet only checks for the existence of a previous event, so on the last event, it displays:
    PREVIOUS |

    As stated above, how do I check if there’s a previous AND a next event?
    (I’ve been through the Themer’s Guide. I also searched the forums before posting.)

    On a related note, the prev/next navigation seems to choke on recurring events: if there’s another event between the first and second occurence of a recurring event, it jumps back to the first occurence, instead of the second. Is this a known issue?

    Thanks

    #51139
    Barry
    Member

    Thanks, but the code in the snippet only checks for the existence of a previous event, so on the last event, it displays:
    PREVIOUS |

    Right, it’s just a starting point 🙂

    You could extend it and check if the next event is empty, too, then roll that into the logic for displaying or not displaying the pipe symbol or whatever separator you want to use.

    On a related note, the prev/next navigation seems to choke on recurring events: if there’s another event between the first and second occurence of a recurring event, it jumps back to the first occurence, instead of the second. Is this a known issue?

    It’s not an issue I know of but it’s quite possible – to avoid confusion can you create a new thread and provide instructions to help us see the problem on your site?

    Thanks!

    #51152
    Michael
    Participant

    Geddit. I wasn’t familiar with output buffers, but I eventually got the syntax right.

    #51153
    Barry
    Member

    Excellent 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Single Event Previous/Next Navigation’ is closed to new replies.