| <?php | |
| function setup_image_sizes() { | |
| if ( function_exists( 'add_image_size' ) ) { | |
| add_image_size( 'featured-blog', 186,186,true ); | |
| add_image_size( 'featured-bottom-section', 345,162,true ); | |
| } | |
| } | |
| add_action( 'after_setup_theme', 'setup_image_sizes' ); | |
| function post_image_sizes($sizes){ | |
| $custom_sizes = array( | |
| 'featured-blog' => 'Featured Blog', | |
| ); | |
| return array_merge( $sizes, $custom_sizes ); | |
| } | |
| add_filter('image_size_names_choose', 'post_image_sizes'); | |
| ?> |
How to Add WordPress Custom Image Sizes & Selectors
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
Have Questions? I can help! Get Started


