-
AuthorPosts
-
December 12, 2016 at 2:57 pm #723138
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?
-
This topic was modified 8 years, 11 months ago by
Doubledog.
December 14, 2016 at 12:24 pm #724225Hey 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,
AndyDecember 14, 2016 at 2:15 pm #724268Worked 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?
December 16, 2016 at 5:46 am #725164Hey!
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!
IsmaelDecember 19, 2016 at 10:59 am #725977Thanks, works like a charm.
December 20, 2016 at 6:05 am #726415Hi,
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,
RikardDecember 20, 2016 at 10:53 am #726499Topic can be closed, thanks
December 20, 2016 at 1:05 pm #726532isn’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/postsDecember 20, 2016 at 1:49 pm #726544I 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.
December 21, 2016 at 5:31 am #726887 -
This topic was modified 8 years, 11 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
