Home Forums Support Parallax

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #282182
    David

    Hi Tom,

    I want to set the parallax to appear like this website. Any recommendations?
    http://bridge42.qodeinteractive.com/

    #282183
    Leo
    Staff
    Customer Support

    Hi David,

    This should help: https://docs.generatepress.com/article/page-header-content/#parallax-effect

    You can change the speed by using a filter and do something like this:

    add_filter( 'generate_page_header_parallax_speed','tu_page_header_parallax_speed' );
    function tu_page_header_parallax_speed()
    {
    	return 6;
    }

    Adding php: https://docs.generatepress.com/article/adding-php/

    Make sure you are running the most recent version of GP Premium (1.2.94) as this filter is quite new!

    Hope this helps!

    #282184
    David

    Thanks Leo for the quick reply. I have the setting for Parallax is enabled and I am not getting a similar result as http://bridge42.qodeinteractive.com/. I need to match this.

    You can review here: http://cmcwebdev.com/privacypos/

    Cheers!

    #282185
    Leo
    Staff
    Customer Support

    Have you tried changing the speed as I mentioned above?

    #282195
    David

    Code is in place. I need to lock the header and have the first section overlap the header.

    Cheers!

    #282198
    Leo
    Staff
    Customer Support
    #282201
    David

    Just enabled it.

    Review:
    http://cmcwebdev.com/privacypos/

    #282210
    David

    Hi Leo, That didn’t get the desired result. What is next?

    #282217
    Tom
    Lead Developer
    Lead Developer

    Which part exactly are you going for? The actual parallax part of the background images is identical if you look at the code.

    #282231
    David

    Thanks guys for the feedback. I used this code to match the effect used on this website:
    http://bridge42.qodeinteractive.com/

    .page-header-content.parallax-enabled.fullscreen-enabled.generate-page-header.generate-content-header.generate-combined-page-header {
    	position: static;
    	padding: 0;
    	background-repeat: no-repeat;
    	background-color: rgba(0, 0, 0, 0);
    	background-position: center 0;
    	background-attachment: fixed;
    	overflow: hidden;
    }
    #282233
    Leo
    Staff
    Customer Support

    Glad you found the solution!

    #282266
    David

    Thanks!

    #678896
    Manuel

    Maybe this code doesn’t work anymore? I’ve added this to “Code Snippets”:

    add_filter( 'generate_page_header_parallax_speed','tu_page_header_parallax_speed' );
    function tu_page_header_parallax_speed()
    {
    	return 6;
    }

    I’ve tried with return 6, return 1, return 12 but it seems like nothing changed.
    Best regards

    #679175
    David
    Staff
    Customer Support

    Hi there,

    can you raise a new topic where you can add a Site URL and we can advise.

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