The fourth parameter to wp_set_object_terms() is an “append” argument.
$append
(bool) (required) If true, tags will be appended to the object. If false, tags will replace existing tagsDefault: Falsehttp://codex.wordpress.org/Function_Reference/wp_set_object_terms
Your code should work if you pass true as that fourth argument.
wp_set_object_terms(
$post->ID,
explode( ',', $_POST['postTags'] ),
'product_tag',
true
);
Related Posts:
- Get The Post Type A Taxonomy Is Attached To
- How to limit the number of terms (terms acts like categories)
- Custom Taxonomies Terms as Post Title for Custom Post Types upon Publishing
- How to get term link that crosses different custom post types?
- Retrieve single term slug
- Not Able to Insert Taxonomy Term Using wp_insert_post()
- array_pop() expects array, boolean given for $event_type_term ->slug
- How can I add programmatically custom taxonomy terms to a custom type post when saving posts?
- post count is wrong when using same taxonomy for 2 different CPT
- Displaying custom post type by first letter through custom taxonomy
- Separate Custom Post Type Taxonomy by Comma
- Custom Search | Wrong output & question
- Trouble adding custom featured image for custom taxonomy TERMS
- Get child terms of current term of the current post
- List all custom post type posts from a given category?
- Creating a function that receives the taxonomy terms that have been changed in a custom post type
- Output the slug and name of a CPT single post taxonomy term
- Get the terms of a custom taxonomy for a specific author in author template
- How to get category image custom post type taxonomy in wordpress?
- Category page only displaying the posts from a custom type
- How to get posts from multiple custom post types according to it’s custom taxonomy terms?
- How to check the terms in single custom post type template
- Displaying a custom post types custom taxonomy value?
- how to get URL of media uploaded to WordPress via media_handle_sideload()
- Show listings from Impress Listing plugin in random order using taxonomy and terms
- Update post terms with custom taxonomy
- Filtering WP_Query Dynamically on the Front-End
- Get template part using a custom taxonomy term
- How to restrict users and admin from creating new taxonomy terms?
- using $wpdb to get custom post type with term
- Allow user to set custom order to a list of custom taxonomies?
- Displaying custom taxonomy in the admin list of a custom post type
- Which post does a taxonomy term belongs to?
- How do I display the taxonomy term alongside the post type post title?
- Custom post taxonomies as tax_query terms?
- Issue on Creating Custom Tax Term Dynamically From Another CPT Meta-box On Publish
- How do I display the taxonomy for a custom post type in an array
- How do I require the specification of term in a custom post type and custom taxonomy?
- Custom Post, set object Taxonomy terms in plugin
- How to include term custom meta into the custom taxonomy term permalink structure
- Setup template_redirect using has_term when NO term assigned
- 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
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- Add term to custom post type on draft
- Listing all term items alphabetically / sorting loop
- How to get WordPress term attached to the Post?
- Output terms for custom post types
- return only the first two terms of custom post
- Get parent category id from child category page for custom taxonomy
- Category archive in with conjunction with custom post type is empty
- How to get only child terms from a custom taxonomy of current post type?
- How to Display Posts From Category Within a Custom Taxonomy?
- The Difference Between Categories and Tags and Taxonomies and Terms
- Get the link of the first post of a custom taxonomy in a custom taxonomy list
- Commas not displaying in implode
- How can I get 3 different taxonomy type terms in a div class element?
- Get terms for a specfic post from multiple taxonomies in custom post type
- Custom Taxonomy dont save in a frontend form for post a custom post
- Get_the_term_list inexplicably adds values in foreach
- Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category
- Get List of Terms based on a given term (different taxonomy)
- automatically select taxonomy based on post meta
- display post count in archive page that have relation with another taxonomy term
- get taxonomies from terms
- Excluded Custom Taxonomy Term Posts Displaying in loop
- Change the term based on the value of a $variable using wp_update_post in submitting a form
- Get all posts for custom taxonomy term
- posts_per_page is not working by term
- wp_set_post_terms not updating with WP Cron Event
- Dropwdown: Get taxonomy terms from posts that share preselected terms from 3 other taxonomies
- Custom Post Type / Taxonomy / Term – what template to use to avoid 404-page?
- Display title of all custom posts from same taxonomy term on a custom post template
- wordpress does not see the correct custom taxonomy hierarchy
- Add active class to foundation 6 tabs while looping categories
- Saving Child Terms on front end not setting parent
- Get category list & taxonomy list from different post type using post id?
- how it’s possible to show from a post of a custom post type the taxonomy/terms?
- Filter By Term Not Working – Custom Post Type
- Displaying the Taxonomy and a Queried Term on a taxonomy.php page?
- Get posts of an specific term of a custom taxonomy
- WordPress add taxonomies/terms list as a menu in archive page
- Hide Custom Taxonomy title if not associated with another Custom Taxomony
- How to pass taxonomy terms to WP_Query along with $args?
- Fetch posts list from fist CPT taxonomy term and list under 2. CPT
- Issue on Counting CPT’s Under Taxonomy Term
- How to List CPTs Under One Tax Term
- Using get_terms() as shortcode attribute
- Custom post type URL returns 404 error page
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- List custom taxonomy terms
- Navigation links to posts in current term shortcode
- Display associated taxonomy child name on single CPT page
- Get all terms assigned to a post from different taxonomies
- Issue On Listing Woocommerce Parent Tag List
- Taxonomy Archive URL + Template
- Is it possible to get_terms by taxonomy AND post_type?
- Is there a way to edit non-custom term attributes?
- How to determ a custom post type url?