Have you ever thought of controlling featured image sizes in Advanced Post Module?
We are here to help. We’ve added a few filters that will make customization easier and faster. Using ‘uabb_blog_posts_featured_image_sizes’ filter, you can control the featured image sizes. Make use of this filter to add your own registered size for featured images.
You need to put the below code snippet in the functions.php file of your theme/child theme.
Module: Advanced Post
Filter: uabb_blog_posts_featured_image_sizes
Description: This filter can be used to control the featured image sizes. One can add his own registered size for featured images.
// Controls the featured image sizes
function abc($size_arr) {
$size_arr = array(
'full' => __( 'Full', 'uabb' ),
'large' => __( 'Large', 'uabb' ),
'medium' => __( 'Medium', 'uabb' ),
'thumbnail' => __( 'Thumbnail', 'uabb' ),
'custom' => __( 'Custom', 'uabb' ),
'my_custom_image_size' => __( 'My Custom Image Size', 'uabb' ),
); // Add your own size to this array.
return $size_arr;
}
add_filter( 'uabb_blog_posts_featured_image_sizes', 'abc' );
add_image_size( 'my_custom_image_size', 300, 300 );
But to make this filter work, we also need to regenerate thumbnails. For this, you need to install the Regenerate Thumbnails plugin.