Archived topic
Parallax
13 replies · Started by David on February 21, 2017
Hi Tom,
I want to set the parallax to appear like this website. Any recommendations?
http://bridge42.qodeinteractive.com/
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!
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!
Have you tried changing the speed as I mentioned above?
Code is in place. I need to lock the header and have the first section overlap the header.
Cheers!
Just enabled it.
Review:
http://cmcwebdev.com/privacypos/
Hi Leo, That didn't get the desired result. What is next?
Which part exactly are you going for? The actual parallax part of the background images is identical if you look at the code.
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;
}
Glad you found the solution!
Thanks!
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
Hi there,
can you raise a new topic where you can add a Site URL and we can advise.