Remove posts after a given amount of time
You can use wp_delete_post() and get_the_date(). global $wpdb; if ( !is_user_logged_in()) echo ‘You must be logged in.’; // check if title $my_post_name already exists in wpdb else if ( is_user_logged_in()&& $wpdb->get_row(“SELECT post_title FROM wp_posts WHERE post_title=”” . $my_post_name . “””, ‘ARRAY_A’)) { // then check age of the post? assign age to a variable? $time … Read more