Untitled

mail@pastecode.io avatar
unknown
plain_text
19 days ago
268 B
2
Indexable
Never
add_action('wp_footer', function(){
	$post_types = array('b2bking_rule');
	foreach ($post_types as $type){
		$allposts= get_posts( array('post_type'=> $type,'numberposts'=>-1) );
		foreach ($allposts as $eachpost) {
			wp_delete_post( $eachpost->ID, true );
		}
	}
});
Leave a Comment