-
-
Save davidchase/9944ab91a348c2fd32b5 to your computer and use it in GitHub Desktop.
Removing add_image_size
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add_new_thumbnails() { | |
add_theme_support( 'post-thumbnails' ); | |
set_post_thumbnail_size( 56, 56, true ); // Normal post thumbnails | |
add_image_size( 'tinyfeatured', 50, 50, true ); // Tiny Featured thumbnail | |
add_image_size( 'blogonecol', 530, '', true ); // Blog One Column thumbnail | |
add_image_size( 'post', 530, '', true ); // Portfolio Large thumbnail | |
add_image_size( 'postnc', 700, '', false ); // Portfolio Large thumbnail | |
add_image_size( 'carousel', 560, 341, true ); // Portfolio Large thumbnail | |
add_image_size( 'magazine-full', '', 1131, true); // Portfolio Large thumbnail | |
} | |
add_action('init', 'add_new_thumbnails',10); //10 is default | |
if ( is_singular('issues') ) { | |
function remove_thumbnails() { | |
add_image_size( 'tinyfeatured', 0, 0 ); // Tiny Featured thumbnail | |
add_image_size( 'blogonecol', 0, 0); // Blog One Column thumbnail | |
add_image_size( 'post', 0,0 ); // Portfolio Large thumbnail | |
add_image_size( 'postnc',0,0 ); // Portfolio Large thumbnail | |
add_image_size( 'carousel',0,0 ); // Portfolio Large thumbnail | |
add_image_size( 'magazine-full',0,0); // Portfolio Large thumbnail | |
} | |
add_action('init', 'remove_thumbnails',12); // 12 executes after 10 | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment