在你的主题或父主题的某个地方,有这样一行:
add_theme_support( \'post-thumbnails\' );
如果它在你的子主题中,你可以简单地删除它。如果它位于父主题中,则可以将其添加到子主题函数中。php文件。
// in your Child Theme\'s functions.php
// Use the after_setup_theme hook with a priority of 11 to load after the
// parent theme, which will fire on the default priority of 10
add_action( \'after_setup_theme\', \'remove_featured_images_from_child_theme\', 11 );
function remove_featured_images_from_child_theme() {
// This will remove support for post thumbnails on ALL Post Types
remove_theme_support( \'post-thumbnails\' );
// Add this line in to re-enable support for just Posts
add_theme_support( \'post-thumbnails\', array( \'post\' ) );
}
https://codex.wordpress.org/Function_Reference/remove_theme_support