You shouldn’t need to use a custom SQL query – stick to the built-in method wp_delete_post()
. This will also clear out all term relationships too.
Related Posts:
- Exclude posts with taxonomy term from appearing on home page query
- SQL query joining on taxonomy tables not returning what I would expect
- How can I query all post with currrent taxonomy term?
- Retrieve all term IDs of post
- How to filter the terms to a special custom taxonomy?
- Passing values by form to create a query
- tax_query in get_posts() not working?
- What is wp_insert_term “alias_of” arg for?
- How to organize and cache additional data associated with terms?
- get a specific taxonomy term name
- 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 all taxonomy terms / Show links if posts are attached, else names
- Sorting custom taxonomy causes menus error
- How to add terms to taxonomy with wp_insert_terms?
- Get_term_by only returns one item from array
- Can we have same term slug in different taxonomies?
- Is there any difference between post in child term and child & parent terms?
- Create and move terms for taxonomies
- Looping Through Custom Tax Terms and Displaying All Posts For Each
- Missing term_id and term_taxonomy_id when adding a term using wp_insert_term() function
- What hooks/filters are there to alter selected terms on post save?
- Count argument in get_terms has no effect on ouput/doesn’t work
- How can I remove links from the function “get term list”?
- Get Term names from WP Term Object
- tax_query: What to pass when I want to have all terms?
- Add a term to an attachment submitted from front end
- functions to create term and child terms
- Custom query to get terms from post ids
- has_term not working
- Filter taxonomy terms using multiple id in the edit-tags.php
- How do I get the current tag out of a taxonomy?
- Variable in Array Not Working
- Pass array of taxonomy terms to wp_query
- Add current class to queried term on taxonomy term archive
- How to list 2 taxonomy terms for a post, based on their hierarchy
- Custom WP Query: force entry for some taxonomy and have others optional
- Order wordpress taxonomy parent terms by their children count
- how to get the assigned child term of the term’s parent
- Use get_terms to get post_tags but limit to a taxonomy
- Set attachment tags from attachment’s custom field data
- how to show only last child terms of a taxonomy
- 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
- Count Published & Draft Posts Associated With Each Term
- Ordering Taxonomies / Changing term_id
- Fetch and ACF image field from a custom taxonomy outside category/archive page? [closed]
- conditional statement based on terms
- Adding taxonomy terms based on custom field
- Multi Taxonomies same terms
- Make taxonomy terms appear in the order they were made
- get_the_term_list – Return links to edit.php instead of link to taxonomy archive template
- How to sync to custom taxonomies (tag structure)
- Get posts under a category with SQL
- `get_terms()` with `child_of` and `childless` combined
- Add text to the end of each list item in wp_list_categories
- Return Taxonomy Name for Each Term
- echo term name outside the loop, using term slug
- How to add custom meta to ‘pre_get_terms’?
- List custom queried terms in the edit-tags.php?taxonomy page
- Get term from multiple taxonomy
- Clear Terms from Taxonomy for Specific Post IDs?
- Modify output of wp_dropdown_categories to add term IDs to each option
- 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
- Echo taxonomy name – second level
- If has_term, load other theme
- Get terms in hierarchical taxonomy
- How to get the term description in a taxonomy term archive query?
- Taxonomy Checkbox Admin Panel
- Related terms – Terms that feature in post of current term
- Bug using wp_insert_term with switch_to_blog
- how to list parent terms only
- Exclude taxonomy Query if post_type
- $_POST sometimes empty even though isn’t when using edited_[taxonomy] hook
- Checking if a product ID has taxonomy term attached not working with has_term
- Can’t display multiple terms with get_the_terms
- Taxonomy.php inheriting first post
- I want to get term by term_name without taxonomy
- What is this Query? and why its taking too much time? Any way to optimize it?
- taxonomy terms, inverted
- echo a tax term in loop
- How to share terms between two taxonomies?
- Get taxonomy url, name, post count & image
- Taxonomy terms can’t find posts from archive.php or taxonomy.php
- taxonomy terms are not populating select tag options
- What to do with shared terms splitting in WordPress 4.2?
- Related Posts by taxonomy using Advance Custom Fields Plugin
- How to get a query odered by N of matching taxonomies?
- GET Taxonomy ID
- Displaying Results From Custom Taxonomy Query
- 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
- Echo used hierarchical taxonomies parent name
- Order taxonomy terms by the frequency of use in the last 30 days
- How to display a term of taxonomy