Clear calendar until filtered

Home Forums Calendar Products Events Calendar PRO Clear calendar until filtered

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1353766
    Kendrick Snyder
    Participant

    Hi, 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,

    #1354403
    Cliff
    Member

    Hi, Kendrick. Just to confirm, are you wanting to trigger based on just the Event Categories filter or any Filter Bar filter?

    #1354418
    Kendrick Snyder
    Participant

    Hi Cliff, that’s a good point. I would like to have a trigger based on any filter.

    #1355244
    Cliff
    Member

    Hi, 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.

    #1355330
    Kendrick Snyder
    Participant

    Absolutely 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,
    Kendrick

    #1355853
    Cliff
    Member

    Best 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.

    #1366023
    Support Droid
    Keymaster

    Hey 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

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Clear calendar until filtered’ is closed to new replies.