Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

nnnswordfish on "Update add_image_size() function"

$
0
0

I want to dynamicaly update this function - add_image_size() when value of this variable ( $image_size ) is changed, as in example below. I can achieve that with 'Regenerate Thumbnails' plugin, but I want to do without that.

` if ( $image_size === '200x200' ) {
add_image_size( 'portfolio-isotope-200x200', 200,200,true );
} elseif ( $image_size === '700x700' ) {
add_image_size( 'portfolio-isotope-700x700', 700,700, true );
}
`


Viewing all articles
Browse latest Browse all 8245

Trending Articles