Use wp_set_object_terms
after you have the post id for each taxonomy:
...
$post_id = wp_insert_post( $my_post );
wp_set_object_terms( $post_id, $location, 'location' );
wp_set_object_terms( $post_id, $sale_rental, 'sale_rental' );
wp_set_object_terms( $post_id, $price, 'price' );
Related Posts:
- Attaching taxonomy data to taxonomy with wp_insert_post
- wp_set_object_terms() Fails to Set Terms
- How to use a Term Meta Field as a link
- WordPress as thesaurus/dictionnary: what approach?
- Custom Field as Custom Taxonomy?
- How do I insert a post with custom post type and relate it to a custom taxonomy?
- wp_insert_post custom taxonomy multiple Category not added
- Get posts with Taxonomy term meta
- Categorizing posts by location
- Why do my offline development site and online live site behave differently?
- Delete Term via edit-tags.php
- How to show a hierarchical terms list?
- How to add a default item to a custom taxonomy?
- How do I append multiple taxonomies to the URL?
- Automatically Assign Parent Terms When A Child Term is Selected
- Custom Taxonomy-specific JavaScript
- get term by id without taxonomy
- wp_insert_term – parent & child problem
- Taxonomy terms sort by… Last name!
- get_terms with posts that have a different taxonomy with term x
- How to show only Standard Format post in my custom taxonomy page -wordpress 3.8.1
- Count posts for each taxonomy term for each month
- Filter blog archive by category in URL
- taxonomy/category term in URL slug irrelevant for post?
- Embed YouTube video on category description
- Manually query posts by taxonomy with MySQL
- Custom Taxonomy leads to 404 page
- Show only, when taxonomy has posts?
- Custom search for custom post meta with pre_get_posts interferes with WP search
- Convert Custom Post Types to Custom Taxonomies
- How do I query a taxonomy term range
- Hide custom field if empty
- get_terms problem : related articles
- Why “Warning: Invalid argument supplied for foreach()”
- WordPress User Taxonomy Saved Values
- Display Taxonomy Description on edit-tags screen?
- get_the_terms error
- How can I find the taxonomy in edited_{taxonomy}?
- How to display data in archive page?
- update_post_meta, xml parser
- changing meta value and meta key of price field
- Automatically check parents (in a taxonomy) when child is selected
- Get product variation attribute titles – WooCommerce
- Problem with orderby
- Problem with Query on Taxonomy
- Duplicate Custom Post Type and Taxonomy Slug
- Taxonomy archive + query attachments = duplicate results
- Exclude posts which have any term in a certain taxonomy from the query
- Comma separated tax terms, with “and” before last item [duplicate]
- How to add and display a taxonomy term image in any template? (Taxonomy Images)
- relating business and products with custom taxonomy?
- Get Link to Feed On Term or Taxonomy
- Creating links to a page displaying posts from a particular category
- HTML in category name
- How to get my register taxonomy
- How can I completely hide a taxonomy term from “frontend”? [closed]
- How to display taxonomy term custom meta (using wp_get_object_terms?)?
- How to get if child category of this category is empty?
- Adding inline help to category/taxonomy checkboxes in admin sidebar
- Insert data from custom created PHP page into wp_postmeta table
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Automatically show ‘taxonomy’ meta box by default in Appearance > Menus?
- Echo the Last Child Taxonomy only (not parents)?
- Retrieve all term IDs of post
- Prevent certain subscribers from seeing specific taxonomies (changes frequently)
- child_of not working in wp_dropdown_categories
- How to display posts from two taxonomies?
- Link Posts to External URL
- Use wp_list_categories to list parent categories from actual term
- update_term_meta not working
- Getting more info about the taxonomy?
- How to make HTML select options searchable
- Why doesn’t ‘post__not_in’ work with ‘cat’?
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- How best to add Author or Artist to product
- I want to change the slugs of my terms dynamically
- taxonomy_edit_form_fields output after term fields
- Make/create a category for every page
- All tag/category/custom taxonomy archives 404
- Get a specific category in multiple categories
- Create multidimensional array of taxonomies
- $product->ID in has_term() not working, but manually inputting the ID works, why?
- how do you get one specific term from a shortcode attribute?
- Fatal error Call to a member function filter()
- Using is_tax with multiple taxonomies
- Update post_meta post_name with the post ID from wp_insert_post after user register
- Taxonomy pages, stop them indexing or being generated?
- How to list all names and descriptions of a custom taxonomy
- Looking for suggestions on creating simple database (Help!!)
- Pages throwing 404 error on server load
- Custom terms in custom category taxonomy
- Update fields with post object and custom tax with wp_insert_post
- Display yesterday’s last post’s Custom field from Unique terms of one Taxonomies
- Special Query: Title, Terms, Content – %LIKE%
- Apply custom taxonomy archive template to children
- Why does my taxonomy code display the first alphabetical term?
- Custom Taxonomy link out the loop
- Why can’t I exclude a term ID from either get_terms or WP_Term_query?
- IF taxonomy archive is hierarchical THEN
- What is the ‘selected’ parameter in wp_dropdown_categories() for?