Hello Friends,
Today I am going to share a helpful information about Divi theme.
As we know that Divi theme is most popular paid theme of the WordPress who have provide a lots of prepaid features, so any one can create a modern stylish website without any coding knowledge.
By default Divi theme are allowing to load thumbnail size image for blog module and Divi theme does not provide a settings to allow fulling size featured image but don't worry we are here to help you.
You will need to add below code in bottom of theme functions.php file and save the file.
// Code start to stop cropping featured image in Divi Blog Module function ld_blog_crop_image_width($width) { return 99999; } function ld_blog_crop_image_height($height) { return 99999; } add_filter( 'et_pb_blog_image_width', 'ld_blog_crop_image_width' ); add_filter( 'et_pb_blog_image_height', 'ld_blog_crop_image_height' ); // End code to stop cropping featured image in Divi Blog Module
Given above code will allow full size image through out the website. If you want to allow full size featured image only for any custom post type archive page then you can do it using a condition. Given below code will allow full size featured image only for "Project" custom post type archive page.
// Code start to stop cropping featured image in Divi Blog Module function ld_blog_crop_image_width($width) { //return the maximum widget only for project post type if ( is_post_type_archive( 'project' ) ) { return 9999; } return $width; } function ld_blog_crop_image_height($height) { //return the maximum height only for project post type if ( is_post_type_archive( 'project' ) ) { return 9999; } return $height; } add_filter( 'et_pb_blog_image_width', 'ld_blog_crop_image_width' ); add_filter( 'et_pb_blog_image_height', 'ld_blog_crop_image_height' ); // End to stop cropping featured image in Divi Blog ModuleEnjoy the code #Divi #Wordpress #Hooks #WooCommerce