How To Disable Venues

This topic contains 4 replies, has 2 voices, and was last updated by  Dan Brubaker 5 years, 10 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #32766

    In attempting to solve my issue here, I might want to just disable venues all together and use an entirely different solution.

    How would I be able to disable venues?

    Dan Brubaker
    #32827

    You can use the filter eventorganiser_options and remove 'event-venue' from the 'supports' array.

    However I plan to add a filter which will help solve you’re original problem.

    Stephen Harris
    #32861

    Can’t get it…

    I tried unset( $options['supports']['event-venue'] ); in my “eventorganiser_options” filter and also tried a remove_post_type_support( 'event', 'event-venue' ); on the WP “init” hook. Neither worked.

    Could you give some more guidance on this? Thank you!

    Dan Brubaker
    #32926

    The ‘event-venue’ is value in the supports array, not an index, so to remove it you would have to do the following:

    add_filter('eventorganiser_options', function($options){
        $options['supports'] = array_diff( $options['supports'], array('event-venue') );
        return $options;
    });
    
    Stephen Harris
    #33032

    Ah – ok. Thank you so much!

    Dan Brubaker
Viewing 5 posts - 1 through 5 (of 5 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.