Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #105219
    gargoyle35
    Participant

    Hi;

    Is there any way to use background image to use only on homepage?

    Thanks.

    #105267
    Mahesh
    Participant

    @gargoyle35: Yes, this can be done with Custom CSS. Where do you actually want to use the background image? Let me know further.

    Regards,
    Mahesh

    #105272
    gargoyle35
    Participant

    Especially on “front page”. If the way you’ll show works I can try for different pages/posts for different background images.

    Thanks for your help.

    #105279
    Mahesh
    Participant

    @gargoyle35: For home page, go to Dashboard=> Appearance=> Customize=> Additional CSS and add the following CSS:

    body.home {
        background-image: url("url-to-image-1");
        background-position: center center;
        background-size: cover;
    }

    For sergi page, add the following CSS:

    body.page-id-13 {
        background-image: url("url-to-image-2");
        background-position: center center;
        background-size: cover;
    }

    Note: Please replace the image url in the above codes (url-to-image-2) with you desired image url.

    Regards,
    Mahesh

    #105284
    gargoyle35
    Participant

    Thank you very much for your help.

    Best regards ( :

    #129115
    Frej Martin
    Participant

    Hi Mahesh

    I am not sure if this is the same repeated question or if it is possible at all.

    I would like to have a different background image for each page in the primary menu.

    So if it is the exact thing you are explaining above, just a little clarification:

    Should I change “page-id-13” to the ID of the page where I want a new background image? And where do I see the ID of the page?

    And for the background image URL, if I have uploaded it to my media, should I ID it exactly as the image file?

    Thank you

    #129174
    Mahesh
    Participant

    @frej-martin: Please post in your site url. Could you please clarify more.
    For page id, please use Catch IDs plugin:
    https://wordpress.org/plugins/catch-ids/

    I don’t get the following line:
    And for the background image URL, if I have uploaded it to my media, should I ID it exactly as the image file?

    Regards,
    Mahesh

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Background Image Only on Homepage’ is closed to new replies.