Skip to content

Instantly share code, notes, and snippets.

@nielslange nielslange/functions.php
Last active Sep 24, 2019

Embed
What would you like to do?
Overwrite default image sizes.
<?php
// Overwrite default image sizes.
add_action('init', 'smntcs_remove_image_sizes');
function smntcs_remove_image_sizes() {
add_image_size( 'course_archive_thumbnail', 0 );
add_image_size( 'course_single_thumbnail', 0 );
add_image_size( 'lesson_archive_thumbnail', 0 );
add_image_size( 'lesson_single_thumbnail', 0 );
add_image_size( 'portfolio_horizontal', 0 );
add_image_size( 'portfolio_slider', 0 );
add_image_size( 'portfolio_vertical', 0 );
add_image_size( 'shop_catalog', 0 );
add_image_size( 'shop_thumbnail', 0 );
add_image_size( 'woocommerce_gallery_thumbnail', 0 );
add_image_size( 'woocommerce_single', 0 );
add_image_size( 'woocommerce_thumbnail', 0 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.