function add_theme_features() { // Add Image Sizes $containerLG = 1170; // Change this if you have updated the largest bootstrap container width. for ($i=1; $i <= 12; $i++) { add_image_size( 'col-lg-'.$i, ceil($containerLG / 12 * $i), ceil($containerLG / 12 * $i) * 10, false ); } } // Hook into the 'after_setup_theme' action add_action( 'after_setup_theme', 'add_theme_features' );