11 reputation
3
bio website creative-creature.ca
location
age
visits member for 2 years, 5 months
seen Dec 31 '13 at 2:45

Feb
23
comment How to empty wordpress custom post Database table
The code for the page template is:<?php // Get 50 custom post types pages, set the number higher if is not slow. $mycustomposts = get_posts( array( 'post_type' => 'movies', 'numberposts' => 300)); echo '<pre>'; print_r($mycustomposts); echo '</pre>'; foreach( $mycustomposts as $mypost ) { // Delete's each post. wp_delete_post( $mypost->ID, true); // Set to False if you want to send them to Trash. } echo '<h1 style=:"color:red;"> DELETED! DELETED! DELETED! DELETED! </h1>'; // 50 custom post types are being deleted everytime you refresh the page.?>
Feb
23
comment How to empty wordpress custom post Database table
I used the wp_delete_post() function to solve this problem. All I did was, created a page template and anytime I went to that page it would delete 300 posts.
Sep
26
comment How to empty wordpress custom post Database table
yes I know that much .. but I have around 2400 posts that is a little too much to delete manually ..