• dEM0nsTAr

    (@dem0nstar)


    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

    https://www.ads-software.com/extend/plugins/wp-crontrol/

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