Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

remove all post in wordpress by query

$allposts= get_posts( array('post_type'=>'product','numberposts'=>-1) );
foreach ($allposts as $eachpost) {
wp_delete_post( $eachpost->ID, true );
}
 
PREVIOUS NEXT
Tagged: #remove #post #wordpress #query
ADD COMMENT
Topic
Name
9+3 =