This website lists a nice way of deleting posts based on category
The relevant code is:
delete a,b,c,d FROM wp_posts a LEFT JOIN wp_term_relationships b ON ( a.ID = b.object_id ) LEFT JOIN wp_postmeta c ON ( a.ID = c.post_id ) LEFT JOIN wp_term_taxonomy d ON ( d.term_taxonomy_id = b.term_taxonomy_id ) LEFT JOIN wp_terms e ON ( e.term_id = d.term_id ) WHERE e.term_id =<category id>
<category id> needs to be replaced with the relevant number.
I need to modify this code to mass delete custom post types based on their taxonomy.
By pressing on the edit button in wordpress admin i can retrieve the following information:
So i will need to modify the SQL code above to take:
post_type= os_estate taxonomy= estate_agents tag_ID= 9098
Any help with this would be much appreciated.