-
AuthorPosts
-
January 7, 2016 at 5:04 pm #561373
Hello dear Support-team!
I have a question regarding the child theme and the functions.php settings.
How does this work if I only want to use some different code out of the functions.php child theme?
Do I have to copy the complete functions.php as recommended:
/*
* if you run a child theme and dont want to load the default functions.php file
* set the global var below in you childthemes function.php to true:
*
* example: global $avia_config; $avia_config[‘use_child_theme_functions_only’] = true;
* The default functions.php file will then no longer be loaded. You need to make sure then
* to include framework and functions that you want to use by yourself.I want to use following settings – and all of the rest of the default functions.php:
$avia_config[‘imgSize’][‘widget’] = array(‘width’=>36, ‘height’=>36); // small preview pics eg sidebar news
$avia_config[‘imgSize’][‘square’] = array(‘width’=>180, ‘height’=>180); // small image for blogs
$avia_config[‘imgSize’][‘featured’] = array(‘width’=>1600, ‘height’=>400 ); // images for fullsize pages and fullsize slider
$avia_config[‘imgSize’][‘featured_large’] = array(‘width’=>1600, ‘height’=>630 ); // images for fullsize pages and fullsize slider
$avia_config[‘imgSize’][‘extra_large’] = array(‘width’=>1600, ‘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’][‘portfolio_small’] = array(‘width’=>260, ‘height’=>185 ); // images for portfolio 4 columns
$avia_config[‘imgSize’][‘gallery’] = array(‘width’=>800, ‘height’=>494 ); // images for portfolio entries (2,3 column)
$avia_config[‘imgSize’][‘magazine’] = array(‘width’=>710, ‘height’=>375 ); // images for magazines
$avia_config[‘imgSize’][‘masonry’] = array(‘width’=>705, ‘height’=>705 , ‘crop’ => false); // images for fullscreen masonry
$avia_config[‘imgSize’][‘entry_with_sidebar’] = array(‘width’=>800, ‘height’=>494); // big images for blog and page entries
$avia_config[‘imgSize’][‘entry_without_sidebar’]= array(‘width’=>1600, ‘height’=>400 ); // images for fullsize pages and fullsize slider
$avia_config[‘imgSize’] = apply_filters(‘avf_modify_thumb_size’, $avia_config[‘imgSize’]);Is it correct if I only copy this into the child functions.php? Or will it be ignored?
Thanks for your help!
January 7, 2016 at 5:31 pm #561381Hi StudioLiner!
Please add the code as following to your child theme functions.php file
add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 ); function enfold_customization_modify_thumb_size( $size ) { $size['portfolio'] = array('width'=>495, 'height'=>400); return $size; }
Regards,
YigitJanuary 8, 2016 at 4:11 pm #562068Hello Yigit
thanks for the answer.
Do I have to add the code in the child theme additonally above the other code lines I have posted?Thank you
- This reply was modified 8 years, 10 months ago by StudioLiner.
January 8, 2016 at 4:16 pm #562075Hi!
No, you should only add the code i posted above to your child theme functions.php file. It is an only example that changes ‘portfolio’ image sizes. You can copy&paste that line for each image group you would like to modify and change ‘portfolio’ with ‘widget’ for example
Best regards,
YigitJanuary 8, 2016 at 4:32 pm #562089Hi Yigit,
ah ok i understand!
That means vor example:add_filter( ‘avf_modify_thumb_size’, ‘enfold_customization_modify_thumb_size’, 10, 1 );
function enfold_customization_modify_thumb_size( $size ) {
$size[‘featured_large’] = array(‘width’=>1600, ‘height’=>630);
return $size;
}
add_filter( ‘avf_modify_thumb_size’, ‘enfold_customization_modify_thumb_size’, 10, 1 );
function enfold_customization_modify_thumb_size( $size ) {
$size[‘extra_large’] = array(‘width’=>1600, ‘height’=>1500);
return $size;
}and so on.
Correct?January 8, 2016 at 4:35 pm #562090Hi!
As following would be the correct one
add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 ); function enfold_customization_modify_thumb_size( $size ) { $size['featured_large'] = array('width'=>1600, 'height'=>630); $size['extra_large'] = array('width'=>1600, 'height'=>1500); return $size; }
and you can add other image sizes you would like to add right below “featured_large’ and ‘extra_large’ :)
Cheers!
YigitJanuary 8, 2016 at 4:38 pm #562091And an additional question:
what is the “attribute” for the default picture size behind the color section backround image?
Thanks!cheers
January 8, 2016 at 4:47 pm #562101Hi!
You can adjust them by editing your color section elements. If that is not what you meant, please elaborate :)
Regards,
YigitJanuary 8, 2016 at 5:41 pm #562121Hi Yigit,
because bigger pictures look blurry i have changed the settings regarding to this post:
https://kriesi.at/support/topic/image-quality-2/Now I try to create pictures in the same size as $size to set standards and optimize the last drop quality.
Is there a better way to get the best out of picture quality?- This reply was modified 8 years, 10 months ago by StudioLiner.
January 8, 2016 at 6:30 pm #562150Hey!
Can you please post the link to your page where we can see blurry background image?
Best regards,
YigitJanuary 12, 2016 at 12:38 pm #563835Hi Yigit,
here you can see that the images are not as good as they could be.
At most: the three backround images on the color section paralax (meal, chestnut leafs, chestnuts)January 12, 2016 at 4:52 pm #564008Hi!
You are inserting your background images in 1280x1280px. Can you please try uploading them in at least 1920px in width and desired height (1200px to keep the ratio)?
Regards,
YigitJanuary 12, 2016 at 5:02 pm #564016Hi Yigit,
sure, the backround images have the size you explained. But here im satisfied with the quality.
I have problems with the paralax pictures. This pictures have a size of 1900x475px and they are in comparison very blurry.Thanks for help!
January 13, 2016 at 9:42 am #564448Hi!
Parallax background images should be taller rather than wide because the parallax container where the image is contained is much taller than the actual color section. The images in the parallax demo is 1500x1500px in size.
Cheers!
IsmaelJanuary 13, 2016 at 12:17 pm #564580Hi Ismael,
thank you for your response!
And here we go! On the whole site i only want to add a backround picture to the color section (nothing else!). Therefore I don´t need a much taller container.
So I want to change the specifications for the paralax picture in the color section. How can that be managed?
Please read back at the the beginning of this post.
Maybe:
$size['extra_large'] = array('width'=>1900, 'height'=>475);
Enhanced question:
I only want to build the page for max. 1920x1060px. I do not care about the quality decreasising on bigger screens.
If I select the “At least 50% of Browser Window height” for a paralax picture without repeat what is the mind. picture height?
475px is perfect for the page clipping (on max. 1060px) but I do have to note the “paralax function” I recognize?I want to optimize the size because of the loading speed (its even a backround image..)
Many thanks for your advanced help!!
CheersJanuary 14, 2016 at 4:45 pm #565523Hi!
you can find all image sizes in functions.php:
$avia_config['imgSize']['widget'] = array('width'=>36, 'height'=>36); // small preview pics eg sidebar news $avia_config['imgSize']['square'] = array('width'=>180, 'height'=>180); // small image for blogs $avia_config['imgSize']['featured'] = array('width'=>1500, 'height'=>430 ); // 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']['portfolio_small'] = array('width'=>260, 'height'=>185 ); // images for portfolio 4 columns $avia_config['imgSize']['gallery'] = array('width'=>710, 'height'=>575 ); // images for portfolio entries (2,3 column) $avia_config['imgSize']['entry_with_sidebar'] = array('width'=>710, 'height'=>270); // big images for blog and page entries $avia_config['imgSize']['entry_without_sidebar']= array('width'=>1030, 'height'=>360 ); // images for fullsize pages and fullsize slider
and modify what you need. Afterwards you need to regenerate thumbnails, clear browser cache and hard refresh a few times.
You could also use a plugin like https://de.wordpress.org/plugins/simple-image-sizes/Hope this helps!
Best regards,
AndyJanuary 14, 2016 at 5:46 pm #565614Hi Andy,
once again:
What is the imgSize Code line for the paralax section?
The information in your answer do I have allready.Best regards
January 18, 2016 at 8:49 am #567001Hey!
Parallax effect is applied using background image and not an HTML IMG tag so it does not have such attributes.
Please post the link to your page and point out the color section you would like to change so we can provide you a custom CSS code to change parallax background imageCheers!
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.