Can I use the tribe_events_register_event_type_args filter to add post category?

Home Forums Calendar Products Events Calendar PRO Can I use the tribe_events_register_event_type_args filter to add post category?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #60888
    Kevin
    Participant

    I see that there is a filter called ‘tribe_events_register_event_type_args’. Is there a way to hook to this filter to alter the post type array that is being registered? Specifically I want to make the following change to the taxonomies array:

    ‘taxonomies’ => array(‘category’,’post_tag’)

    I have seen the post at https://theeventscalendar.com/integrating-wordpress-categories-tags-with-your-events/ which has you register the post type yourself, but since there is a filter, seems most appropriate to simply alter the array with that filter. Possible?

    #61806
    Rob
    Member

    Hey Kevin! Just a heads up I’ve got Barry taking a look here now, and we should have you a reply shortly. Thanks a lot for your patience so far.

    #61995
    Barry
    Member

    Hi Kevin, I see no reason why you couldn’t. Something like this ought to swing it:

    add_filter('tribe_events_register_event_type_args', 'change_event_type_args');

    function change_event_type_args(array $args) {
    $args['property'] = 'custom value';
    return $args;
    }

    #63454
    Rob
    Member

    Looks like the code might have gotten slightly mangled; Kevin, was this of any help?

    #64491
    desertreview
    Participant

    My events page freezes. I have a news marque at the top and that quits moving, plus when I click on the event to get more info – a blank page of my site shows up. Also no choice of listings, photo, etc. I have the pro.
    My site is http://www.thedesertreview.com

    #64761
    Rob
    Member

    Hey desertreview. We can definitely try to help you out here; but mind posting a new thread, rather than chiming into this existing one? It’d be the best course of action for us to serve you in as timely a fashion as possible. Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Can I use the tribe_events_register_event_type_args filter to add post category?’ is closed to new replies.