【发布时间】:2013-03-12 18:03:34
【问题描述】:
我想使用 WP-Crontrol 自动删除包含特定内容的 Wordpress 帖子(或者可能是我还不知道的更好的解决方案)。 我添加了以下 cron 作业,但它没有做任何事情:
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);
}
}
我怎样才能让它工作? 谢谢
【问题讨论】: