Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #25274

    Found a similar topic here and tried to apply this piece of code, but it doesn’t seem to work for me.

    I’m trying to change the size of image size for entry without sidabar…

    what am I doing wrong:

    The following was added to functions.php in the child theme:

    function avia_change_image_size_array() {

    global $avia_config;

    $avia_config = array(‘width’=>1030, ‘height’=>450 );


    add_action( ‘init’, ‘avia_change_image_size_array’);



    Maybe you need to regenerate the thumbnails: to see the effect?

    Best regards,



    I will try that.. but i don’t think its that…

    When i use layout builder and choose blog there is options there for the size of the image;

    “Select custom preview image size; Choose image size for Preview Image”

    you see when i make that change in the core functions.php i see the option for 1030×450 immediately, but when i enter it in the child functions, that option is not there.

    basically, it doesn’t use the child settings, only the core …


    You can also try the after_setup_theme hook: (Purchase code hidden if logged out)(Purchase code hidden if logged out)

    In this case the code would look like:

    function avia_change_image_size_array() {
    global $avia_config;
    $avia_config['imgSize']['entry_without_sidebar'] = array('width'=>1030, 'height'=>450 );
    add_action( 'after_setup_theme', 'avia_change_image_size_array');


    Unfortunately, this didn’t work either.

    I guess its not a huge issue. I just need to remember to adjust the sizes with every theme upgrade.

    Thanks for trying.. :)


    Sorry about that, I did some digging as well before but didn’t find anything either. What I typically do when I have to make changes to the core theme is make a changelog.txt file of my own that stays in the theme folder or child theme folder so that I can keep track of all my own changes by line and with code all in the same file.



Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘overwrite imgzise global settings in child theme’ is closed to new replies.