How can I detect if I'm on an "all recurring events" archive?

Home Forums Calendar Products Events Calendar PRO How can I detect if I'm on an "all recurring events" archive?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1107681
    Andy
    Participant

    I’ve set up a bit of code to redirect to the next or last event in a recurring event’s series, but I’m worried about the check I’m using to see if it’s on an “all recurring events” archive page. I currently use the following:

    if (is_post_type_archive("tribe_events") && is_archive() && is_single()) {

    This appears to work fine, but it could match in situations that aren’t all recurring events pages. What I’d really like is something like is if (is_recurring_events_archive()) or something similar. Is there any way to achieve this?

    #1107937
    Brook
    Participant

    Howdy Andy,

    The best way to do this would be to check the following:

    get_query_var( 'eventDisplay' ) == 'all'

    That should only be true on the /all/ recurrences page. Does that sound like what you’re looking for? Cheers!

    – Brook

    #1108158
    Andy
    Participant

    Yes, thank you very much 🙂

    #1108192
    Brook
    Participant

    You are very welcome! Please do let me know if you need anything else regarding this.

    Cheers!

    – Brook

    #1114310
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How can I detect if I'm on an "all recurring events" archive?’ is closed to new replies.