-
AuthorPosts
-
April 9, 2018 at 1:02 pm #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.
April 9, 2018 at 1:19 pm #939154Hey 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 loadedBest regards,
MikeApril 9, 2018 at 2:18 pm #939230so in my case what should I do?
April 10, 2018 at 1:37 am #939504Hi,
Try adding this to your functions.phpfunction 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,
MikeApril 10, 2018 at 8:08 pm #939996I inserted these settings in the child theme, but the images are always resized according to the settings of the parent theme
April 11, 2018 at 2:16 am #940138Hi,
Did you Regenerate New Image Sizes? Please see this post: How to Regenerate Thumbnails or New Image SizesBest regards,
MikeApril 11, 2018 at 10:54 am #940400yes, i do
April 12, 2018 at 9:08 pm #941134This 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)
April 13, 2018 at 1:08 am #941191Hi,
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 -
AuthorPosts
- The topic ‘Enfold child theme function.php’ is closed to new replies.