Archived topic
Different Background Images for different pages
5 replies · Started by Magesh on July 17, 2018
Hi,
I have purchased the GP Premium yesterday, I would like to put different background images for different pages ( for example page 1 will have one background image and page 2 will have different background image ). Also is it possible to have the background in parallax effect?
Can you please let me know how we can achieve this? I have added the plugin simple CSS as well.
Kind Regards,
MP
Hi there,
so with Simple CSS you have a Meta box for it on each page. So you can simply add this for each page:
body {
background-image: url('image_url.jpg');
background-size: cover;
background-repeat: no-repeat;
}
Tom provides some code here for parallax background:
https://generatepress.com/forums/topic/site-background-parallax-effect-to-body/#post-350945
Hi David,
I tried the code you have supplied and it did not bring on the background image. I tried instead of body I used .inside-article and that brings on the background image.
Regarding the Parallax, I have saved the code and it is still not showing in parallax effect.
Kind Regards,
MP
If you find this line in the code:
body_parallax_element( "body" ).forEach( function( el, index, array ) {
You need to change body in ( "body" ) to the selector you have used ie. .inside-article
Hi David,
Thank you for your fantastic support.
Kind Regards,
MP
Glad to be of help