Home › Forums › Calendar Products › Events Calendar PRO › Calendar Shortcode and categories
- This topic has 7 replies, 3 voices, and was last updated 6 years, 8 months ago by Charles Daly.
-
AuthorPosts
-
July 26, 2017 at 5:28 am #1326270Charles DalyParticipant
I am working on doing some work with a few specific calendars for certain categories. For those calendars I am using shortcode to isolate the specific category I am looking to display. I have that part figured out and ready to go. My questions is around the main calendar itself. Because I am pulling out certain categories to be displayed in their own calendar through short code, I am hoping there is a way to exclude those categories in the main calendar. So my questions is, for the average user coming to my site, how can I clean up some of the “clutter” and exclude categories? Or, can I use shortcode for the main calendar and filter multiple categories?
July 27, 2017 at 8:46 pm #1327259JenniferKeymasterHi Charles,
Thanks for reaching out! That’s a great question.
You could add the shortcode to a page with the filters you want to include and use that page as your “main” calendar page, but if you would like to remove certain categories entirely from the main calendar, try adding the snippet in this post to your functions.php file (changing the slugs in the line
$exclude_cats = array('meetup', 'shindig');
to the slugs for the categories you would like to exclude).Let me know how that works for you!
Thanks,
Jennifer
July 28, 2017 at 5:01 am #1327347Charles DalyParticipantThank you for the reply! I just have two questions.
1. You can have multiple categories in the shortcode? How would I do that? I would prefer to have the shortcode for the calendar and use it as the main calendar.
2. If I go the route of entering your snippet code in the function.php; where would I insert the code?August 1, 2017 at 12:55 am #1328638JenniferKeymasterHi Charles,
Great questions!
Unfortunately, the [tribe_events] shortcode currently only supports one category. We do have an open request for multiple category support over in our Feature Ideas Forum, so if you have a minute, please head over there and cast your vote for this feature!
As a workaround, I have seen another user adding the categories they want to include under a parent category, and then using the parent category in the shortcode.
If you decide to go with the code, you can just add it right onto the end of your child theme’s functions.php file.
I hope that helps! Please let me know if you have any other questions.
Thanks,
Jennifer
August 2, 2017 at 3:56 am #1329357Joshua WaltonParticipantThanks for the workaround!
August 4, 2017 at 10:15 pm #1331127JenniferKeymasterNo problem, I hope it works for you! Let me know if there’s anything else I can help you with!
Thanks,
Jennifer
August 26, 2017 at 9:35 am #1340758Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Calendar Shortcode and categories’ is closed to new replies.