Home › Forums › Calendar Products › Events Calendar PRO › Clear calendar until filtered
- This topic has 7 replies, 2 voices, and was last updated 8 years, 6 months ago by
Kendrick Snyder.
-
AuthorPosts
-
September 22, 2017 at 9:37 pm #1353766
Kendrick Snyder
ParticipantHi, is there a way to have nothing show on the calendar until a filter is applied? For example, no events will be displayed at all until a category is selected? Unfortunately, I can’t seem to find the answer in the FAQs.
Thanks,
September 25, 2017 at 11:11 am #1354403Cliff
MemberHi, Kendrick. Just to confirm, are you wanting to trigger based on just the Event Categories filter or any Filter Bar filter?
September 25, 2017 at 11:24 am #1354418Kendrick Snyder
ParticipantHi Cliff, that’s a good point. I would like to have a trigger based on any filter.
September 26, 2017 at 3:47 pm #1355244Cliff
MemberHi, Kendrick.
I worked hard on this one for you…
https://gist.github.com/cliffordp/49d5f296dcae2e6f13773d48d32fd274
I also submitted an internal feature request to make detecting this easier.
Please let me know how this goes for you.
September 26, 2017 at 9:16 pm #1355330Kendrick Snyder
ParticipantAbsolutely appreciate the help!
Unfortunately, I can’t seem to get it working. Maybe I’m implementing wrong. I’m adding to the theme’s functions.php file. It doesn’t seem to break anything. However, events are still showing on the calendar.
Great idea – from what I understand it looks like we are tricking the calendar into displaying null categories and changing the text display from “no events” to “please choose a category.”
Thanks much,
KendrickSeptember 27, 2017 at 3:39 pm #1355853Cliff
MemberBest practice for adding custom code is to create a functionality plugin, unless it’s something specific to your theme, in which case best practice is to make sure you’re using a child theme<i>,</i> then add the customization to your child theme’s functions.php file.
Putting in your functions.php file is A-OK for initial testing if the snippet is working, too.
If you copy the code, make sure to not copy the initial <?php into your functions.php file (assuming you’re just adding it into an existing functions.php file).
Also make sure you put it in the functions.php file of your active theme (preferrably child theme). Or just move it all into a plugin from the start; that way you can activate/deactivate it at any time.
October 19, 2017 at 9:35 am #1366023Support Droid
KeymasterHey 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 ‘Clear calendar until filtered’ is closed to new replies.
