WordPress删除所有的特色图片

发布日期:

mysql语句:

DELETE FROM wp_postmeta WHERE meta_key = '_thumbnail_id';

PHP代码:

global $wpdb;
$wpdb->query( "
    DELETE FROM $wpdb->postmeta
    WHERE meta_key = '_thumbnail_id'
" );