Hi, Is there a way to reduce the amount of parallax that is applied to the background? In the private content I have placed my test version. Is there a way to have it move less, but still keep the parallax effect?
Hey Doubledog,
try this code inside functions.php:
add_filter('avf_parallax_speed','avia_change_parallax_ratio', 10, 2);
function avia_change_parallax_ratio($ratio, $id){
$ratio = "0.3";
return $ratio;
}
and adjust “0.3” as needed. Higher number for more speed.
Best regards,
Andy
Worked well for the image that needed it. It has however effected every image with parallax. Is there a way to only apply it to a certain class or id?
Hey!
Yes, it’s possible. Please adjust the code a bit.
add_filter('avf_parallax_speed','avia_change_parallax_ratio', 10, 2);
function avia_change_parallax_ratio($ratio, $id){
if($id != 'av_section_4') return;
$ratio = "0.3";
return $ratio;
}
Cheers!
Ismael
Thanks, works like a charm.
Hi,
Great, glad we could help. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
Rikard
Topic can be closed, thanks
isn’t it possible to make it more specific and give the color-section a custom class and make it via this class?
it is not so implausible to have another av_section_4 on different pages/posts
I ran into this too, but decided it was not worth going deeper into because it wasnt relevant to my case. I think the only way to make it more specific is to start from the body ID all the way in the header (which has page-id-28 as class) and working down.