I think you have used wrong tax_input parameter value for wp_insert_post() function it should be array like this
array( 'taxonomy_name' => array( 'term', 'term2', 'term3' ) )
as shown in the following code
$my_post = array(
'post_title' => $title,
'post_content' => $content,
'post_status' => 'publish',
'post_type' => 'faenas',
'tax_input' => array( 'faenas_combenef_category' => array( $location ) )
);
Related Posts:
- Advanced search form with filters for custom taxonomies and custom fields
- Get Posts by Custom Post Type ,Taxonomy, and Term
- Get The Post Type A Taxonomy Is Attached To
- How to limit the number of terms (terms acts like categories)
- wp_get_object_terms(): count relative to passed IDs?
- Not Able to Insert Taxonomy Term Using wp_insert_post()
- array_pop() expects array, boolean given for $event_type_term ->slug
- Maintaining strict one-to-one association between terms and custom posts
- If on term-page -> get the current term?
- Creating a function that receives the taxonomy terms that have been changed in a custom post type
- Custom post type / custom fields
- Get all taxonomies for all post types
- How do I provide a “show all posts” link in a paginated term archive?
- Automatically populate a hierarchical taxonomy from a custom field
- How to get posts from multiple custom post types according to it’s custom taxonomy terms?
- get_post_meta returns empty array for terms
- Update post terms with custom taxonomy
- Custom Post Type Archive Page Filtering
- Filtering WP_Query Dynamically on the Front-End
- Get posts by querying taxonomy and certain terms of the taxonomy?
- How do I associate a custom post type with another through a taxonomy or storing an ID in a custom field?
- How do I display the taxonomy term alongside the post type post title?
- Post count by month of taxonmy term
- How do I display the taxonomy for a custom post type in an array
- Custom Post, set object Taxonomy terms in plugin
- Hierarchy and access control for Custom Post Types (CPT)
- First custom field value (out of several) displayed twice after query
- Custom while loop for hierarchical display of a taxonomy
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- Display taxonomy terms, child terms and posts in a template
- Use custom walker to add taxonomy terms to main nav menu
- Add term to custom post type on draft
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- Query posts with double taxonomy
- Adding predefined terms to a taxonomy
- Custom post type’s extra fields – how to handle?
- Custom query – get_the_terms not work
- Targeting categories in custom fields
- Custom taxonomies to define versions of a product
- Shared terms between taxonomies
- How to get dropdown instance value in WordPress custom Widget
- Get taxonomy term by slug in post on archive page
- Display a post from custom post type only if all the selected taxonomies and custom field value matches the record
- custom hierarchical taxonomy and custom post type list contains surplus posts
- get_terms() returns Trying to get property of non-object error for custom taxonomy
- How to populate a Gravity Forms Custom Post Field (dropdown type) with custom taxonomy terms? [closed]
- Custom post type name and assigning custom taxonomy
- Urls in Custom Post Type work for Terms but not for its Taxonomies
- Custom Taxonomy Terms in Menu lead to which page?
- Building a Portfolio and need some direction
- Add filter to Admin list for all custom post types by their custom taxonomies
- Add the custom post term to the custom post title
- Retrieve Custom Taxonomies with Description and Slug
- How to list posts by term (custom taxonomy)
- Making a form for user to add new custom post with custom taxonomies and custom fields
- Confusion about how to use Custom Post Types, Custom Taxonomy or Category?
- Displaying Posts Using a Custom Query with a Custom Field and a term_id
- Taxonomy terms with the same name are updated between separate custom post types
- Query for specific taxonomy that executes a particular loop depending on volume of posts?
- add_filter get array data before display in custom post_type
- Add a class to a div if custom post type has specific terms?
- Custom taxonomy terms hierarchical navigation
- How to display custom taxonomy term specific post?
- How to list posts by terms
- How to order taxonomy terms by most recent post?
- How to associate custom taxonomy terms with custom post type?
- get_queried_object not work in taxonomy page
- wp_insert_post deleting previous post custom meta
- get_the_terms child terms for current post/custom post only
- Adding a Section for Visitors
- Pages of my taxonomy terms are showing all posts
- Custom taxonomy template for custom fields loop [closed]
- How to show terms used only for particular custom post type. Filter creation perpose
- How to get all posts related to a taxonomy?
- Create Inclusions and exclusions
- Custom taxonomy- only output relevant terms
- order taxonomy alphabetical
- What’s the most efficient way to get two queries based on an if statement?
- Filter Term By Parent Term – Custom Post Type
- Display all Custom taxonomy terms and their relevant custom posts
- WordPress get all post with like in terms [duplicate]
- Decrement term in for each
- Best way to group posts based on custom post type terms
- Custom Post Status & Taxonomies
- Prevent repetitive terms in get_the_term_list
- predefined custom field on registration page
- How to retrieve the permalink for a specific (custom) term?
- Show Custom Post Type taxonomy term that matches custom field
- Get term_id for each instance of custom taxonomy
- List a custom taxonomy’s terms, with links, on the taxonomy page
- install.php Custom Taxonomy Term not being added to custom post
- Advanced search form with filters for custom taxonomies and custom fields
- show 10 most recent custom post types excluding the one(s) from specific custom taxonomy
- How to Get The Taxonomy Term in Custom Post Type Loop Inside a Wp Query
- How to change order of custom post types. I want Featured post to come first
- How to manage a bookstore
- pre_get_posts causes Custom Posts appear under ‘Pages’ menu
- Custom Sort Order for Custom Post Type Taxonomy
- WP_Query not using relation key as expected and not producing any results
- How to list custom taxonomy terms without the hyperlinks?