[Resolved] Different Background Images for different pages

Home Forums Support [Resolved] Different Background Images for different pages

Home Forums Support Different Background Images for different pages

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #625521
    Magesh

    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

    #625534
    David
    Staff
    Customer Support

    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

    #625558
    Magesh

    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

    #625579
    David
    Staff
    Customer Support

    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

    #625599
    Magesh

    Hi David,

    Thank you for your fantastic support.

    Kind Regards,

    MP

    #625603
    David
    Staff
    Customer Support

    Glad to be of help

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