How to prevent a event category from showing up on the Default Events Calendar

Home Forums Calendar Products Events Calendar PRO How to prevent a event category from showing up on the Default Events Calendar

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1343330
    Matthew Smith
    Participant

    Hello,

    How can we prevent a specific category from showing up on our default calendar?

    Here is our main calendar:

    https://dphx.org/events/

    We would like to be able to display some events tucked into the website, but not on the main events pages. Here’s an example:

    Young Adults

    Any ideas?

    best,
    Matt

    #1344657
    Jennifer
    Keymaster

    Hi Matthew,

    Thanks for reaching out!

    There is not currently an out of the box way to do this, but you could accomplish it with via a customization. Try adding the snippet from this post to the functions.php file of your child theme, replacing the category slugs (look for ‘terms’ => array( ‘concert’, ‘convention’ ) ) that are currently there with the ones you want to exclude from the main calendar. In this particular example, the categories are being excluded from the list and month views. You can change that by either changing the view (for example replacing “list” with “photo” or adding/removing the conditions (look for $query->query_vars[‘eventDisplay’] == ‘list’). Let me know if you have any questions on this…if you are not familiar with PHP, you may want to do this in a testing site first until you get it working the way you’d like. Our themer’s guide is also a great place to look for help when doing customizations like this.

    To then display these events elsewhere on your site, you can use the shortcodes that come with Events Calendar Pro. However, please note that both the main calendar and the shortcodes use the same views. So if you exclude a category from a particular view (say list view for example), it will not show up on the main calendar page in list view or on other pages where you may be using a shortcode to display events in list view.

    Let me know how that works for you!

    Thanks,

    Jennifer

    #1355046
    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 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How to prevent a event category from showing up on the Default Events Calendar’ is closed to new replies.