something along these lines should do it:
$args = array(
'post_type' => 'listings',
'posts_per_page'=> -1,
'post_status' => 'any',
'tax_query' => array(
array(
'taxonomy' => 'status',
'field' => YOUR FIELD NAME HERE???
'terms' => 'standard'
)
)
);
$query = new WP_Query( $args );
foreach( $query->posts as $id ){
wp_delete_post( $id->ID, TRUE );
}
Related Posts:
- Using Custom Posts with Metaboxes and Drop-downs
- How to display data in archive page?
- Set terms in a custom post
- Get posts of ONE taxonomy term of custom post type
- Duplicate Custom Post Type and Taxonomy Slug
- Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?
- How do I insert a post with custom post type and relate it to a custom taxonomy?
- relating business and products with custom taxonomy?
- How To Use Custom Tax of a Post Type
- How to output all taxonomy links from a custom post type in a menu?
- Show post count in custom taxonomy page
- Customizing URL slugs of Custom Post Type and Taxonomy make posts/pages 404
- Multiple Custom Post Type loop logic
- How to list all names and descriptions of a custom taxonomy
- 404 for some custom taxonomy not ALL taxonomy
- Special Query: Title, Terms, Content – %LIKE%
- Taxonomy Category category.php not working
- How to display by default only published posts/pages in the admin area?
- Find out who deleted a page or post?
- Post/Page Preview Template
- using wp_update_post on save_post
- Show WordPress Custom Taxonomy Items Based On a Selected Item From Another Custom Taxonomy
- Replace image attributes for lazyload plugin (data-src)
- WordPress plugin to publish to multiple remote WordPress blogs
- Any way to create a revision of a post ONLY with a new button in the Meta Box?
- How to display comments and comment form on custom post type?
- Convert IPTC keywords to blog post tags
- Show Custom Taxonomy Categories, Listing of Posts, and Single Post via AJAX
- How to wrap every image in a post with a div?
- Show One Category on Post
- WordPress Delete hook with wp_delete_post function?
- Custom post type single (permalink) throws a 404 error
- Order post by year DESC and month ASC
- Do I use custom post type or something else?
- how “manage_posts_custom_column” action hook relate to “manage_${post_type}_columns” filter hook?
- How do I get the slug of a custom taxonomy category of a post?
- Delete Post From Front-End and attachment permanently
- Custom post type permalinks breaking due to 3.1 bug fix
- Get post id in wordpress action?
- Display page content AFTER a loop of posts
- How can I create custom button in post.php
- how to replace embedded “full” sized images within a post with the “large” ones
- Downgrade user from role that allows post creation
- Remove slashes (both before and after) in relative post url
- Animated gif for a thumbs
- Edit custom post type admin menu link
- I am unable to publish/update post
- How to include a post type in the admin/backend?
- WordPress Custom Fields (Checkboxes with multiple values)
- Using custom post template
- Adding custom fields to bbpress reply form
- Adding buttons to Add New Post and Add New Page
- Posts list in custom taxonomy
- How to Restrict Previous & Next Post Link to Posts of Same Category?
- WordPress custom Query for Posts in Category display posts multiple times
- Editing the default page to show all posts, rather than most recent ones
- Prepending %category% onto default posts fails
- get_adjacent_post by language
- Permission issue with custom post type – not added to menu – by plugin
- Add a custom meta box in the post options that loads some html code in the header
- Static posts page with home.php
- Is it possible to customize the post according to post format in single.php?
- Using setup_postdata() with multi-dimensional array
- WordPress bulk category select when publishing post
- Display the 2nd category name of a custom post type without error if its null?
- Querying another post category to match current post and display in loop
- datepicker value in mysql
- Simple Custom Metabox Not Saving
- How to restore deleted post related with deleted users
- Custom Post Type Single Loop Outputting Wrong Post
- Organization of time insensitive content
- Can I style single post that are in multiple catergories?
- Geting error in post and category [closed]
- WordPress Post Deletion Issue
- How Can I Always Display A Particular Post First Using WP_Query?
- MySQL: Possible to replace all of wp_posts.post_content(id#) via UPDATE + REPLACE + SELECT?
- Change modified date to current date when title updated automatically
- How to put the author of the post in the comments?
- How to add a custom class attribute into code wrapper? [duplicate]
- Redirecting wordpress search query to archive page
- Post not using taxonomy template
- How to create custom search form function including post “tags”
- How to invoke a HTML custom button based on a HTML dropdownlist menu
- Create/Set Category as Title of Post
- Please I want to prefix my WP posts title according to each category
- Custom Post Type Rewrite URL
- Custom Post Types and Broken Permalinks
- Page with Category Returning 1
- The first post appears twice
- Show Posts By Custom Field
- How to retrieve custom field values and save again as array
- Is there a Standard Format for Clean URLs for Archives of Custom Posts?
- Customize search results to include custom posts and display in a specific template page
- Custom permalink based on custom post type fields
- Checking if some condition is matched before inserting post into database
- Custom Post Title as search term
- adding custom meta as well as looping through posts
- How remove “recent comments” title without modifying code? [closed]
- How edit footer copyright info? [closed]
- Need to show birthday of custom post type(Famous people in this case) in elementor. Date of birth set in custom fields