Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #939147

    hello, I inserted in the functio.php file of the son theme this change:

    $ avia_config [‘imgSize’] [‘widget’] = array (‘width’ => 36, ‘height’ => 36); // small preview pics eg sidebar news
    $ avia_config [‘imgSize’] [‘square’] = array (‘width’ => 920, ‘height’ => 690); // small image for blogs
    $ avia_config [‘imgSize’] [‘featured’] = array (‘width’ => 1500, ‘height’ => 430); // images for fullsize pages and fullsize slider
    $ avia_config [‘imgSize’] [‘featured_large’] = array (‘width’ => 1500, ‘height’ => 630); // images for fullsize pages and fullsize slider
    $ avia_config [‘imgSize’] [‘extra_large’] = array (‘width’ => 1500, ‘height’ => 1500, ‘crop’ => false); // images for fullscrren slider
    $ avia_config [‘imgSize’] [‘portfolio’] = array (‘width’ => 495, ‘height’ => 400); // images for portfolio entries (2.3 column)
    $ avia_config [‘imgSize’] [‘custom’] = array (‘width’ => 450, ‘height’ => 338); // images for portfolio entries (2.3 column)
    $ avia_config [‘imgSize’] [‘portfolio_small’] = array (‘width’ => 260, ‘height’ => 185); // images for portfolio 4 columns
    $ avia_config [‘imgSize’] [‘gallery’] = array (‘width’ => 920, ‘height’ => 690); // images for portfolio entries (2.3 column)
    $ avia_config [‘imgSize’] [‘magazine’] = array (‘width’ => 920, ‘height’ => 690); // images for magazines
    $ avia_config [‘imgSize’] [‘masonry’] = array (‘width’ => 920, ‘height’ => 690, ‘crop’ => false); // images for fullscreen masonry
    $ avia_config [‘imgSize’] [‘entry_with_sidebar’] = array (‘width’ => 920, ‘height’ => 690); // big images for blog and page entries
    $ avia_config [‘imgSize’] [‘entry_without_sidebar’] = array (‘width’ => 920, ‘height’ => 690); // images for fullsize pages and fullsize slider
    $ avia_config [‘imgSize’] = apply_filters (‘avf_modify_thumb_size’, $ avia_config [‘imgSize’]);

    $ avia_config [‘selectableImgSize’] = array (
    ‘square’ => __ (‘Square’, ‘avia_framework’),
    ‘featured’ => __ (‘Featured Thin’, ‘avia_framework’),
    ‘featured_large’ => __ (‘Featured Large’, ‘avia_framework’),
    ‘portfolio’ => __ (‘Portfolio’, ‘avia_framework’),
    ‘gallery’ => __ (‘Gallery’, ‘avia_framework’),
    ‘entry_with_sidebar’ => __ (‘Entry with Sidebar’, ‘avia_framework’),
    ‘entry_without_sidebar’ => __ (‘Entry without Sidebar’, ‘avia_framework’),
    ‘extra_large’ => __ (‘Fullscreen Sections / Sliders’, ‘avia_framework’),

    );

    The problem is that it does not accept the change. The others inserted all work. I also tried to reload the images, but always sees the settings of the parent theme.

    #939154

    Hey forever_prodotti,
    Try to wrap your code into a function and use the init hook to add your thumbnail size to the avia_config array: overwrite the avia_config array after the main theme functions.php is loaded

    Best regards,
    Mike

    #939230

    so in my case what should I do?

    #939504

    Hi,
    Try adding this to your functions.php

    
    function avia_change_image_size_array() {
    global $avia_config;
    $ avia_config ['imgSize'] ['widget'] = array ('width' => 36, 'height' => 36); // small preview pics eg sidebar news
    $ avia_config ['imgSize'] ['square'] = array ('width' => 920, 'height' => 690); // small image for blogs
    $ avia_config ['imgSize'] ['featured'] = array ('width' => 1500, 'height' => 430); // images for fullsize pages and fullsize slider
    $ avia_config ['imgSize'] ['featured_large'] = array ('width' => 1500, 'height' => 630); // images for fullsize pages and fullsize slider
    $ avia_config ['imgSize'] ['extra_large'] = array ('width' => 1500, 'height' => 1500, 'crop' => false); // images for fullscrren slider
    $ avia_config ['imgSize'] ['portfolio'] = array ('width' => 495, 'height' => 400); // images for portfolio entries (2.3 column)
    $ avia_config ['imgSize'] ['custom'] = array ('width' => 450, 'height' => 338); // images for portfolio entries (2.3 column)
    $ avia_config ['imgSize'] ['portfolio_small'] = array ('width' => 260, 'height' => 185); // images for portfolio 4 columns
    $ avia_config ['imgSize'] ['gallery'] = array ('width' => 920, 'height' => 690); // images for portfolio entries (2.3 column)
    $ avia_config ['imgSize'] ['magazine'] = array ('width' => 920, 'height' => 690); // images for magazines
    $ avia_config ['imgSize'] ['masonry'] = array ('width' => 920, 'height' => 690, 'crop' => false); // images for fullscreen masonry
    $ avia_config ['imgSize'] ['entry_with_sidebar'] = array ('width' => 920, 'height' => 690); // big images for blog and page entries
    $ avia_config ['imgSize'] ['entry_without_sidebar'] = array ('width' => 920, 'height' => 690); // images for fullsize pages and fullsize slider
    $ avia_config ['imgSize'] = apply_filters ('avf_modify_thumb_size', $ avia_config ['imgSize']);
    }
    add_action( 'init', 'avia_change_image_size_array');

    Best regards,
    Mike

    #939996

    I inserted these settings in the child theme, but the images are always resized according to the settings of the parent theme

    #940138

    Hi,
    Did you Regenerate New Image Sizes? Please see this post: How to Regenerate Thumbnails or New Image Sizes

    Best regards,
    Mike

    #940400

    yes, i do

    #941134

    This worked for me (add to your functions.php):

    add_image_size( 'custom', 450, 338, true );

    (take out the ‘,true’ if you do not want the image cropped)

    #941191

    Hi,

    Thank you for the update, we appreciate it a lot!

    Feel free to create a new ticket if you do need anything else.

    Thank you very much

    Best regards,
    Basilis

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Enfold child theme function.php’ is closed to new replies.