WordPress.org

Support

Support » Plugins and Hacks » WP Crontrol » Delete a post by content with WP-Crontrol

Delete a post by content with WP-Crontrol

  • I want to delete posts with a specific content automatically with WP-Crontrol.
    I have added the following cron job but it doesn’t do anything:

    global $wpdb;
    $result = $wpdb->get_results( "SELECT ID FROM wp_posts WHERE post_content LIKE 'Content which should result in a deletion of this post'" );
      if ($result){
        foreach($result as $pageThing){
          wp_delete_post($pageThing);
        }
      }

    How can I make it work?
    Thanks

    http://wordpress.org/extend/plugins/wp-crontrol/

  • The topic ‘Delete a post by content with WP-Crontrol’ is closed to new replies.
Skip to toolbar