Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #459601

    Hello. I copied the following code from the parent theme’s functions.php file and pasted it into the child theme’s functions.php file:

    $avia_config[‘imgSize’][‘entry_with_sidebar’] = array(‘width’=>845, ‘height’=>321); // big images for blog and page entries

    When I adjust the height setting in the code (in the child theme’s functions.php file), it does not reflect the changes on the website (it only reflects the changes if I adjust the height setting directly in the parent theme’s functions.php file.

    Is there something else that I need to be doing to make that line of code in the child theme’s functions.php file override that line of code in the parent theme’s functions.php file?

    #459951

    Hey ACNLatitudes!

    Thank you for using Enfold.

    Please use this plugin in order to adjust the thumbnail sizes: https://wordpress.org/plugins/simple-image-sizes/

    After adjusting the size of the thumbnail, you need to regenerate the images or upload it again. You can find the thumbnail info and regenerate button on Settings > Media panel.

    Cheers!
    Ismael

    #460511

    Thanks for the suggestion, but it really doesn’t answer my question and I have never needed to use a plugin to change the size of my featured images on any other theme I have ever used in the past. Perhaps you misunderstood my question.

    The functions.php file in enfold has image dimensions (as noted here: https://kriesi.at/support/topic/enfold-image-sizes/). I am able to configure those sizes in the main functions.php file and have the changes reflected on the main website. However, I am using a child theme, so I would prefer to make those changes in the child theme’s functions.php file. if I copy that specific code to my child theme’s functions.php file (and then edit from within there), it does not reflect the changes that I made when I look at the website. Why isn’t it working when done from the child theme’s functions.php file (but it works when making the changes to the main theme’s functions.php file)?

    Please advise.

    #460991

    Hey!

    actually Ismael’s suggestion does answer your question, because this plugin will help you achieve what you want. With it you can define and change size of all your WordPress images, including your featured image. Please use it and let us know in a new ticket, if you have some more questions related to the theme.

    Cheers!
    Andy

    #461466

    Thanks for the reply. With all due respect, my question is asking about a specific issue that I am experiencing when using the child functionality of the Enfold theme. I appreciate the suggestion of using a plugin, but I shouldn’t need to use a plugin for something as simple as changing the featured image size in a theme that is as flexible as Enfold.

    Let me explain once more what the issue is. Changing the image size in the parent theme functions.php file changes the featured image size in my blog posts (that’s a good thing). However, changing it in the child theme’s functions.php file DOES NOT change the image size in my blog posts (that is a bad thing).

    Can you please simply address my original question as to why the image size is not being updated when that same change is being made to my child theme?

    Thanks

    #461921

    Hey!

    If you don’t want to use a plugin, you can override the default thumbnail size with this on functions.php file:

    function ava_image_sizes() { 
    add_image_size('entry_with_sidebar', 261, 186, array('center', 'top'));
    }
    add_action( 'after_setup_theme', 'ava_image_sizes', 11 );

    Again, you need to regenerate the thumbnails or upload it again. The plugin suggested above can regenerate your thumbnails. :)

    Best regards,
    Ismael

    #462274

    Thanks. That worked great!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Problem Changing Size of Featured Image in Blog Post via Child Theme’ is closed to new replies.