Tagged: , ,

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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 7 years, 11 months ago by Doubledog.
    #724225

    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

    #724268

    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?

    #725164

    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

    #725977

    Thanks, works like a charm.

    #726415

    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

    #726499

    Topic can be closed, thanks

    #726532

    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

    #726544

    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.

    #726887

    Hi,

    Thanks for the input @guenni007 and @doubledog.

    Best regards,
    Rikard

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.