You can use the function wp_delete_term
$todelete = array('one','two','three');
foreach ( $todelete as $slug ) {
$term = get_term_by('slug', $slug, 'post_tag');
if ( ! is_wp_error($term) && ! empty($term) )
wp_delete_term( $term->term_id, 'post_tag');
}
Related Posts:
- wp_options table value
- What are terms and taxonomy, how they related to post and how these three are stored in database?
- How to Query Database for posts with certain Taxonomy Term
- Sorting taxonomy columns by meta value numeric
- How to get product order by two custom taxonomy in wordpress
- Looking for suggestions on creating simple database (Help!!)
- Using wp_query is it possible to orderby taxonomy?
- custom post type taxonomy “tag” archive : no post found
- Get taxonomy names by post id
- Modify Term Update Redirection
- Return only the custom sub-term for custom post type, do not echo term-parent
- Get total number of comments from posts in a specific custom taxonomy
- Custom hierarchal taxonomy loses interface hierarchy when selecting parent & children
- Formating the_terms() function output
- Archive template for taxonomy terms
- Custom taxonomy on users with UI
- Get terms of posts with category with sql
- Post tags saving as both tag name & tag ID on post update when tags are displayed as checkboxes
- Taxonomy Relationships
- Combine multiple custom user taxonomy in single url
- Add custom taxonomy to default category taxonomy?
- Display sub-taxonomies based on SELECTED parent-taxonomy
- Checking if a Page has an Associated Term?
- Taxonomy , subtaxonomy,child taxonomy of a product woocommerce
- Get terms ordered by post date
- How to display custom taxonomy in multiple columns?
- How can I get WP to build a feed based on multiple taxonomy terms
- Change permalink of post if it belongs to custom taxonomy
- Get pages only with a specific taxonomy
- Programatically added attribute, set to ‘show on product page’ automatically. Woocommerce [closed]
- Share taxonomy between user and posts?
- How to filter terms from a custom taxonomy by a usermeta value on all screens and templates
- How to adjust code to refresh a dropdown box with tags that are active on filtered category listing
- How to obtain the link/URL to the feed of a custom taxonomy?
- get_term_children doesn’t return an array of children terms
- Get Current Custom Taxonomy ID by Post ID
- Use get_the_terms to list subcategories of custom taxonomy
- Get taxonomy parent using child slug (from merged taxonomies)
- Custom taxonomy [year] is directing to yearly archive
- Display Taxonomy Terms in an option tag with value being the slug
- Modify “View” in admin panel for custom taxonomy
- Hide product categories and taxonomy terms in menu if empty
- Custom taxonomy forms for user profile
- Query posts by taxonomy with current term
- get the taxonomies terms associated with users
- Add Taxonomy Subcategory To Permalink
- Term and sub term from custom post type query [closed]
- Custom Taxonomy Term Archive Page Template that Filters 2 or more Taxonomies
- problem in taxonomy-{taxonomy}.php pagination
- Custom Taxonomy with tax_query
- Override Taxonomy Template
- Get posts in certain Taxonomy terms for the current page url
- How to add images to taxonomy terms? [duplicate]
- Why get_page_template() doesn’t show taxonomy template file name?
- Trying to add taxonomy to get_categories() but it’s not working. How to fix this?
- Edit custom taxonomy description programatically
- Get taxonomy name for the current post
- View the complete list of a taxonomy in the navigation menu
- Get name of taxonomies of current page
- How to get attached image to taxonomy..?
- How to get list of only custom taxonomies?
- Add custom taxonomy as a css class
- Taxonomy page shows category in title
- Query custom taxonomy for category including children
- Only display latest custom taxonomy post
- How can I get Taxonomy Images to work with ‘orderby’ argument?
- Unsetting post_tag taxonomy breaks term description for other taxonomies
- Taxonomies on Pages with Custom Formatting
- How to combine taxonomies into URL?
- Amend taxonomy to search in wordpress admin
- Unique taxonomy for post
- Prioritise Pages over Taxonomy Term Root Archive, but not Taxonomy Term Child Archives
- Add terms to a taxonomy archive from within the same taxonomy
- Show recent posts from a custom taxonomy in wordpress
- Fill New Taxonomies
- add pagination in wordpress page template
- Custom post type and custom taxonomy key lenght & query performance
- how do you pull data from two taxonomies?
- problem : Custom taxonomy template not showing
- Custom dropdown list taxonomy not saved
- How to get all the terms from a custom hierarchical taxonomy via REST api?
- Filter “get_terms” query
- Get post meta value outside of the loop
- How To Create Dynamic Permalink To Custom Taxonomy List of Current Posts?
- Unable to create a new taxonomy
- Change link of taxonomy when get_the_term_list( is used?
- generate random slug when adding taxonomy
- Custom taxonomy shows full articles
- Sort Taxonomy List by Custom Values
- Change order custom taxonomy
- Register custom taxonomy from a Advenced custom field option page
- Query specific posts per user selections from dropdown menus
- Using wp_query is it possible to orderby taxonomy?
- Get custom taxonomy term url on archive page
- Custom Taxonomy Template Variables Available?
- Group custom taxonomies based on tags contained in their posts
- is_tax not working for custom taxonomy
- Add custom display condition to Elementor Theme Builder for custom taxonomy children, grandchildren, and great-grandchildren
- Add text in custom taxonomy
- How do I check if a post has a term with a particular ancestor/parent?