WordPress.org

Forums

Events Manager
[resolved] [closed] exclude category from drop down list (5 posts)

  1. Brian
    Member
    Posted 2 years ago #

    So I am successfully excluding an event category from the full calendar and from the list of events by using [fullcalendar category="-12"] and [events_list category="-12"] respectively. My problem arises with the category drop down box that is a part of the full calendar. The hidden category shows in that drop down and then becomes visible.

    http://buildmke.org/events/

    Is this a bug? Is there a way to correct this?

    http://wordpress.org/plugins/events-manager/

  2. angelo_nwl
    NetWebLogic Support
    Posted 2 years ago #

    try this snippet

    function em_wpfullcalendar_category_label($taxonomy_args,$taxonomy){
     if ( $taxonomy->name == 'event-categories'){
      $taxonomy_args['exclude'] = '77';
     }
     return $taxonomy_args;
    }
    add_filter('wpmfc_calendar_taxonomy_args','em_wpfullcalendar_category_label',1,2);

    where 77 is your category id

    As for where to paste this : http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/

  3. Brian
    Member
    Posted 2 years ago #

    That worked brilliantly! Thanks!

    I inserted it into the functions.php of my child-theme.

    Would be nice if someone would turn this into a little plugin that hooked into settings page of wp-fullcalendar to add category exclusion there.

    Thanks again!

  4. angelo_nwl
    NetWebLogic Support
    Posted 2 years ago #

    glad it worked.

  5. turrikan
    Member
    Posted 2 years ago #

    Hi, i still have the problem..

    I insert this code in the page:

    [fullcalendar type="post" category="11"]

    that only shows category 11..

    but in the categories dropdown list, appears all categories.. and your code doesn't work.. could you please help me..

    thanks,

    andrea

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic