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.
-
AuthorPosts
-
April 28, 2017 at 8:14 pm #1276160DavidParticipant
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,
DavidMay 1, 2017 at 2:17 pm #1276949TrishaMemberHello, 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,
TrishaMay 1, 2017 at 6:08 pm #1277028DavidParticipantThank 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 & CEOMobile: (216) 402-1573
LinkedIn Facebook
TwitterCheck out my new book, Thriving with Diabetes
,
a step-by-step guide to lifelong health and happiness!May 1, 2017 at 8:35 pm #1277045TrishaMemberHi, 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 -
AuthorPosts
- The topic ‘Conditional function to check if on a Community Events page’ is closed to new replies.