(Solved) tribe_create_event: category?

Home Forums Calendar Products Events Calendar PRO (Solved) tribe_create_event: category?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #47074
    efromdc
    Participant

    How do you specify an event category via the function tribe_create_event? It isnt listed at –>

    https://theeventscalendar.com/support/documentation/the-events-calendar-advanced-functions-event-post-type/

    Note I need this answer for BOTH the “regular” and the “pro” version if the answer is different from version to version

    Thanks

    #47119
    Jonah
    Participant

    Hi efromdc,

    I don’t believe this is currently possible but I’m checking in with the team. If it’s not possible, we’ll look into getting this added in a future release. Stay tuned for a follow up.

    #47360
    Jonah
    Participant

    Hi efromdc,

    You actually can do this now and you don’t need the Pro version. tribe_create_event() ultimately uses http://codex.wordpress.org/Function_Reference/wp_insert_post which allows you to pass in a custom taxonomy.

    Does that help?

    #47361
    efromdc
    Participant

    Im not sure. Because if you use the WP function, doesnt that create a “regular” post category if you specify one…and NOT an “event” category?

    To elaborate, I was under the impression that after your plugin is installed and activated, there are TWO category columns: One thats stock wp and the other thats specific for events created via your plugin…and your response suggests that that might not be the case, that specifying an event category ISNT stored in the stock wp category column…

    Can you clarify?

    #47368
    Jonah
    Participant

    Hi efromdc,

    What I meant to say is that you can use any of the wp_insert_post args with tribe_create_events. So you can pass in taxonomy args (the event categories are stored as custom taxonomies) like documented for wp_insert_post with tribe_create_events.

    By default there is only one category box for events included by our plugin. This is the one for event categories. If the default WordPress category box is displaying, you would have to have added this manually via your theme’s functions.php file or via some other method because we don’t register support for default WP cats in the plugin.

    Does that make sense/help?

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘(Solved) tribe_create_event: category?’ is closed to new replies.