Using API to create events: how to add Category

Home Forums Calendar Products Events Calendar PRO Using API to create events: how to add Category

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #658098
    halostribe
    Participant

    I’m using the API to create/update events, organizers and venues.
    Everything works perfectly, but I can’t figure out how to add a category to an event.
    It doesn’t seem to be possible using the API?

    #659433
    Barry
    Member

    Hi halostribe,

    If you’re using tribe_create_events() then it is worth noting this is effectively a wrapper around wp_insert_post() – and so you can pretty much use the same arguments (and apply taxonomy terms via a tax_input argument. More details can be found in the WordPress docs:

    Does that help?

    #664750
    halostribe
    Participant

    That’s the solution! Thank you, Barry.

    #668147
    Barry
    Member

    Awesome, happy to help 🙂

    I’ll go ahead and close this thread out since it looks like you’re all set – but if we can assist with anything else please don’t hesitate to create a new thread and one of the team will be only too happy to help.

    Last but not least, if you have a moment to spare we’d love to hear your thoughts on The Events Calendar over on our plugin review page. Thanks again!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Using API to create events: how to add Category’ is closed to new replies.