Conditional function to check if on a Community Events page

Home Forums Calendar Products Community Events Conditional function to check if on a Community Events page

  • This topic has 4 replies, 2 voices, and was last updated 7 years ago by David.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1276160
    David
    Participant

    What is the conditional to check if we are on a Conditional Events page?

    Just a suggestion, but the lack of a is_events() type function adds a lot of complexity to setting up elements that you want to appear across every Events page. Otherwise, really loving the plugin – and looking forward to the styling improvements coming up soon. I was just about to dive in and style it from scratch when I saw your very nice mockups.

    Best,
    David

    #1276949
    Trisha
    Member

    Hello, David!

    Thank you for using The Events Calendar! I can help with this ?

    Glad you like the mockup! We’re excited about the release!

    There are quite a few conditional functions that you can use to determine the event page type you’re on. For Community Events you want to use ‘tribe_is_community_my_events_page‘ for the ‘My Events’ page and ‘tribe_is_community_edit_event_page‘ for the ‘Add New Event’ form. I just tested both of these with success.

    This Gist has a list of many, if not all of the conditionals you can use. https://gist.github.com/theeventscalendar/8b88307bb2c082d6cdba

    Does this help answer your question? Let me know how it goes!

    Cheers,
    Trisha

    #1277028
    David
    Participant

    Thank you. I had found that gist page and it was very helpful for the rest
    of them. This worked perfectly for the Community pages.

    David Edelman
    Diabetes Daily , Co-Founder & CEO

    Mobile: (216) 402-1573
    LinkedIn Facebook
    Twitter

    Check out my new book, Thriving with Diabetes
    ,
    a step-by-step guide to lifelong health and happiness!

    #1277045
    Trisha
    Member

    Hi, David!

    I’m glad to hear this worked for you. Thanks for letting me know 🙂

    I’m going to close this out, but as always, if you need anything else feel free to reach out! I’m happy to help 🙂

    Cheers,
    Trisha

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Conditional function to check if on a Community Events page’ is closed to new replies.