Capabilities for 'tax_input' using wp_insert_post()

Posted May 14, 2013

Is 'taxinput' not working with wpinsertpost()? If a user doesn't have the capability to work with the custom taxonomy, you'll need to use wpsetobjectterms() after using wpinsertpost(). This can happen when saving user input from the front end because a guest or subscriber won't have permission to work with your custom taxonomy. Check out the wpinsertpost() function reference for more info and be sure to check out the notes.

You can also learn more in our guide to assigning custom taxonomies to a post.