-
AuthorPosts
-
February 26, 2022 at 12:16 pm #1342355
I have altered the featured image dimensions as suggested in your support documentation and run the regenerate thumbnails plugin. I am on 4.9 the lates release and this does not work see https://www.wardlawfineart.co.uk/news/ I have used the following code as I need the featured image to be 845 by 580 px
add_filter( ‘avf_modify_thumb_size’, ‘enfold_customization_modify_thumb_size’, 10, 1 );
function enfold_customization_modify_thumb_size( $size ) {
$size[‘entry_with_sidebar’] = array(‘width’=>845, ‘height’=>580);
$size[‘portfolio’] = array(‘width’=>845, ‘height’=>580);
return $size;
}Can you please help
February 26, 2022 at 11:26 pm #1342432Hey condonpb,
Thanks for the FTP access, but I couldn’t login to WP with the admin login, nonetheless I tested your function on my demo site and regenerated my thumbnails and it worked correctlyadd_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 ); function enfold_customization_modify_thumb_size( $size ) { $size['entry_with_sidebar'] = array('width'=>845, 'height'=>580); $size['portfolio'] = array('width'=>845, 'height'=>580); return $size; }
Perhaps this code near the top of your child theme functions.php is causing a conflict:
$avia_config[ 'imgSize' ][ 'featured' ] = array( 'width' => 1500, 'height' => 555 ); // images for fullsize pages and fullsize slider
try removing this and adding it to your enfold_customization_modify_thumb_size function like this:add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 ); function enfold_customization_modify_thumb_size( $size ) { $size['entry_with_sidebar'] = array('width'=>845, 'height'=>580); $size['portfolio'] = array('width'=>845, 'height'=>580); $size['featured'] = array( 'width' => 1500, 'height' => 555 ); return $size; }
and regenerated your thumbnails again, and check.
Best regards,
MikeFebruary 27, 2022 at 10:16 am #1342444Mike,
many thanks for this I have tried adding the new code and removing the one you think could conflict in child theme functions.php but still does not work after using the regenerate thumbnails plugin…
Can you help
Many thanks
Pete
February 27, 2022 at 10:53 am #1342448Mike,
many thanks for this I have tried adding the new code and removing the one you think could conflict in child theme functions.php but still does not work after using the regenerate thumbnails plugin…
Can you help
Many thanks
Pete
February 27, 2022 at 1:52 pm #1342463February 27, 2022 at 7:59 pm #1342489Please try this. Sorry
February 28, 2022 at 12:11 am #1342500Hi,
Thanks for the login, it seems like the Regenerate Thumbnails was not working correctly, because when I used the Regenerate Thumbnails option in the Simple Image Sizes plugin the thumbnails were resized. Then I noticed that while the image sizes were correct they were show at full width on the blog page, so I added this css to your child theme stylesheet:#top.blog .big-preview.single-big { max-height: 580px; max-width: 845px; margin: auto; }
now the featured images on your blog page /news/ are showing correctly.
Please clear your browser cache and check.Best regards,
MikeFebruary 28, 2022 at 10:59 am #1342523Mike,
Many Thanks one again all ok now
Pete
February 28, 2022 at 1:04 pm #1342547Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Alter Featured Image on Blog Does not work’ is closed to new replies.