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
- Orderby two meta fields not working
- Show only first child in dropdown
- Insert data from custom created PHP page into wp_postmeta table
- Taxonomy vs Post Status
- Custom Post Type not showing anything added by code anymore?
- Taxonomy.php error appearing in the header of my site [closed]
- Display posts from tagchildren of taxonomy tagparents
- How can I get some of a posts meta data whilst it is still inserting?
- Custom Post Type + Custom Taxonomy = Archive Listing Page Problems
- Taxonomy term archive default loop returns 1 record instead of 8
- If has_term, load other theme
- Problems making shortcode with custom post types and taxonomy
- Terms from current post custom taxonomy — excluding parent and only from a single parent term
- Simple Custom Metabox Not Saving
- Taxonomy Overview Page?
- remove a single post_meta
- Counting posts by certain author with custom taxonomy
- Best way to achieve multiple links in a post title
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Automatically show ‘taxonomy’ meta box by default in Appearance > Menus?
- Get terms in hierarchical taxonomy
- Declaring arguments for taxonomy
- archive page sidebar not working
- How can I query all post with currrent taxonomy term?
- Can you have seperate sidebars for multiple taxonomy archives?
- Echo the Last Child Taxonomy only (not parents)?
- how to add datas in taxonomy to post with wp_insert_post
- Tax Query trouble
- How to query term_id of a Custom Taxonomy by name
- Display check marked taxonomies as drop down menu
- Taxonomy Checkbox Admin Panel
- Retrieve all term IDs of post
- Prevent certain subscribers from seeing specific taxonomies (changes frequently)
- Related terms – Terms that feature in post of current term
- Replacing a placeholder term with a session variable value in taxonomy filter
- child_of not working in wp_dropdown_categories
- How to display posts from two taxonomies?
- Bug using wp_insert_term with switch_to_blog
- Link Posts to External URL
- Using taxonomies to handle layout?
- How To Use Custom Tax of a Post Type
- Loop problem – Taxonomy
- How to output all taxonomy links from a custom post type in a menu?
- how to list parent terms only
- Select query with two and two related taxonomies
- Return single taxonomy term outside the loop
- Related Taxonomy Doesnt Show any Posts
- How to relate to 2 taxonomy with category
- How to order a taxonomy’s terms numerically, from lowest to highest using get_terms
- Get something out from taxonomy
- Taxonomy Dropdown Question
- Use wp_list_categories to list parent categories from actual term
- get_term_by with a variable
- Displaying Custom Taxonomy Children in Dropdown
- Custom Taxonomy With Author?
- WP Search using taxonomy terms
- Exclude taxonomy term from list of current taxonomy terms
- How to embed the Taxonomy Admin screen in to a Tab of a Settings Page in a plugin
- update_term_meta not working
- Tags hierarchical
- Insert Custom Field Value
- Display List of All Taxomony Terms of A Post
- Exclude taxonomy Query if post_type
- Customize menu link for taxonomy in WP menu
- Get ACF taxonomy term and sub-term lists ACF blocks
- WP_Query, Taxonomy, list of attached items to a Term, sorted
- Getting more info about the taxonomy?
- Question about link two types of data in wordpress
- Change searching from world level to first letter
- Calling an Archive Page with specific Tag/Tax ID
- How to show parent taxonomy using get_the_terms?
- Assign Multiple Values from Post Fields to Taxonomy Terms
- How To Query For An Empty Taxonomy Field
- Rewrite slug for WP core taxonomies
- how can send a parameter by click on gender-link to filter a post by gender and product taxo
- query variables for custom taxonomies
- Is possible hide hierarchical select dropdown created by jetsmartfilters? (only visual issue)
- How to make HTML select options searchable
- Finding id of taxonomy by name in custom post type
- How do I list taxonomies that have upcoming events in WP? Is there a way to do this without having to query posts first?
- How do I converge taxonomy category permalinks into one?
- Query Two Different Taxonomies Nested
- How to have article URL like example.com/article1 and example.com/foo/article2?
- wp_insert_term doesn’t want to enter its data into custom taxonomy
- $_POST sometimes empty even though isn’t when using edited_[taxonomy] hook
- ACF Taxonomy in Loop
- Taxonomy terms are not checked when edit custom post
- How to bulk Update URLs to new values?
- Is it possible to prevent the deletion of taxonomy by detecting $_GET request