-
AuthorPosts
-
July 26, 2023 at 4:44 pm #1414542
Hi Enfold-Team
I would like to reduce the size of the post images in the blog.
I have not found a suitable setting in the Enfold Child “Blog”.
What is the solution?Thanks,
BeatJuly 27, 2023 at 7:48 am #1414614Hi Beat,
Please add this code in functions.php of your child theme, if you don’t have a child theme then you can use the plugin called WPCode to insert this code snippet:
function enfold_customization_modify_thumb_size( $size ) { $size['entry_without_sidebar'] = array('width'=>845, 'height'=>321); return $size; } add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 );
Just replace the height and width value, then re-upload your image.
Hope it helps.Best regards,
NikkoJuly 27, 2023 at 11:02 am #1414645Hi Nikko.
Thank you very much for your suggestion. Unfortunately, I couldn’t see any changes and the post image is still too big in the blog.
By the way: I use a sidebar in the blog. The code in functions.php refers to entries without a sidebar.Best regards,
BeatJuly 27, 2023 at 11:35 am #1414652Hi Beat,
I apologize, you are correct, it should be entry_with_sidebar not entry_without_sidebar:
function enfold_customization_modify_thumb_size( $size ) { $size['entry_with_sidebar'] = array('width'=>845, 'height'=>321); return $size; } add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 );
Best regards,
NikkoJuly 27, 2023 at 12:02 pm #1414656Hi Nikko
Thank you very much.
I can’t see any changes in the image size. Not even when I change the height and width values in functions.php. Do you have another suggestion?Best regards,
BeatJuly 27, 2023 at 12:44 pm #1414665Hi Beat,
I have checked it again and it seems the code is working but the CSS forces images to use 100% width, that’s why it doesn’t look like it’s working.
Please add this CSS code in Enfold > General Styling > Quick CSS:#top .big-preview img { width: auto; }
Best regards,
NikkoJuly 27, 2023 at 9:16 pm #1414716Hi Nikko,
Perfect! It works fine now.
Thanks for the CSS code.
Best regards,
BeatJuly 28, 2023 at 1:55 am #1414721Hi Beat,
I’m glad that we could help you :)
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘Change image size in the blog’ is closed to new replies.