wp_set_object_terms()
has a fourth argument called append
. Setting that to true during the call should add the term without unsetting the already set terms.
wp_set_object_terms( $post_id, 'add_this_term', 'in_this_taxonomy', true);
Related Posts:
- The Difference Between Hierarchical and Non-Hierarchical Taxonomies?
- How to get taxonomy term of the current page and populate queries in the template
- Custom taxonomy list page?
- What is wp_insert_term “alias_of” arg for?
- List Hierarchical Term List with Count with Related Term
- Is there a way to set singular/plural labels for taxonomy term names?
- get_terms() How many is TOO many?
- List taxonomy terms as links
- Sorting custom taxonomy causes menus error
- Can we have same term slug in different taxonomies?
- Is there any difference between post in child term and child & parent terms?
- Add additional data to a specific taxonomy term when used in a post
- Display the number of published posts for each custom taxonomy term?
- Get wordpress taxonomy archive and sort by year
- Search for tags
- Create and move terms for taxonomies
- Display Post by taxonomy and taxonomy child if exist
- Missing term_id and term_taxonomy_id when adding a term using wp_insert_term() function
- How can I remove links from the function “get term list”?
- Alphabetical order in taxonomy.php
- Get Term names from WP Term Object
- functions to create term and child terms
- WordPress REST get all items without a taxonomy assigned
- How do I get the current tag out of a taxonomy?
- I need template for my custom taxonomy term
- Show list of custom taxonomies when another taxonomy is selected
- If search matches taxonomy
- WordPress as thesaurus/dictionnary: what approach?
- Custom taxonomy is crashing Gutenberg
- How to show the category filter that’s shown on the ‘All post’ pages on a custom post type page in the admin area?
- Custom WP Query: force entry for some taxonomy and have others optional
- Using get_posts() with tax_query parameter set isn’t working with attachments
- How to get the top level parent term Advanced Custom Field values in the child terms
- Modify the query method when adding category filtering function to the custom post list
- Allow a Taxonomy Term to be Used Only Once Across All Posts
- need to get postthumnails from a post whithin a category custom post type
- Individual post. Meta_key, taxonomy or post status for separation?
- Count Published & Draft Posts Associated With Each Term
- Taxonomy archive page WP_Query does not return get_the_permalink() or get_permalink() value
- How to show taxonomy image instead of taxonomy name on a list
- get_the_term_list – Return links to edit.php instead of link to taxonomy archive template
- benefits of the table ‘wp_term_taxonomy’
- How to sync to custom taxonomies (tag structure)
- List posts in a category grouped by other categories?
- is_taxonomy() is not working
- Add text to the end of each list item in wp_list_categories
- echo term name outside the loop, using term slug
- What are these undocumented arguments for register_taxonomy?
- get_term_by seems to be failing
- How to return newly added terms when using wp_set_object_terms
- How to get terms from a custom taxonomies after WordPress 4.5.0
- How to update a taxonomy term for a custom post type with auto incrementing number
- Search Media by taxonomy
- Get Taxonomy name from “registered_taxonomy” hook
- Filtering elements by taxonomy slug
- Echo taxonomy name – second level
- Show only first child in dropdown
- Custom Post Type + Custom Taxonomy = Archive Listing Page Problems
- Taxonomy term archive default loop returns 1 record instead of 8
- Get terms in hierarchical taxonomy
- Taxonomy Checkbox Admin Panel
- Replacing a placeholder term with a session variable value in taxonomy filter
- Loop problem – Taxonomy
- Select query with two and two related taxonomies
- How to relate to 2 taxonomy with category
- Taxonomy Dropdown Question
- WP Search using taxonomy terms
- Customize menu link for taxonomy in WP menu
- Is possible hide hierarchical select dropdown created by jetsmartfilters? (only visual issue)
- How do I converge taxonomy category permalinks into one?
- Taxonomy terms are not checked when edit custom post
- Url leading to archive page, no matter what
- Checking if a product ID has taxonomy term attached not working with has_term
- Can I create a tax query to return posts that match two slugs from same taxonomy
- Taxonomy.php inheriting first post
- Display related terms from a taxonomy in an entry
- I want to get term by term_name without taxonomy
- Add specific content to a taxonomy results page
- Set the limit of taxonomy per page
- What is this Query? and why its taking too much time? Any way to optimize it?
- taxonomy terms, inverted
- Same page for startpage and archive?
- How to share terms between two taxonomies?
- Taxonomy Rewrite Problem
- Taxonomy terms can’t find posts from archive.php or taxonomy.php
- how to print post tags [duplicate]
- Filtering posts by taxonomy and meta_value
- What to do with shared terms splitting in WordPress 4.2?
- How to get a query odered by N of matching taxonomies?
- GET Taxonomy ID
- Hiding an Advanced Custom Field based on Taxonomy Field selection
- Non-Recursive get_term_children()
- How do I add tags/taxonomy to images + a query field on page to query ‘albums’ (images with same tag/taxonomy)
- Delete Term via edit-tags.php
- multiple taxonomies in wp_list_categories’ $args
- Description of a sub-taxonomy
- Order taxonomy terms by the frequency of use in the last 30 days
- I need to add new menu item inside the custom post admin menu
- How to orderby Taxonomy Term in a WP Query
- is there a hook filter to get custom fields for taxonomy name instead of the default field?