WordPress.org

Forums

WP Crontrol
Delete a post by content with WP-Crontrol (1 post)

  1. dEM0nsTAr
    Member
    Posted 2 years ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Crontrol
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.