New answers tagged

0

To remove all extra image sizes you use get_intermediate_image_sizes() in tandem with remove_image_size(). E.g. function remove_extra_image_sizes() { array_map( 'remove_image_size', get_intermediate_image_sizes() ); } add_action('init', 'remove_extra_image_sizes'); To edit the image size dropdown you can hook a custom function to image_size_names_choose ...


0

Another approch for woocommerce products: add_filter('woocommerce_product_query_meta_query', 'products_with_thumbs', 10); function products_with_thumbs() { return array( 'relation' => 'OR', array('key' => '_thumbnail_id', 'compare' => '>', 'value' => '0') ); }


Top 50 recent answers are included