Site logo

[Resolved] Background image for specific pages

Home Forums Support [Resolved] Background image for specific pages

Home Forums Support Background image for specific pages

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #2568814
    scometamus

    Dear GP-support,

    on the attached page (and only on this and other selected pages) I’d like to add a background image.

    Thus the customiser option of GP Premium doesn’t work for me, as these background images apply to all pages.

    I was able to gather some code in this forum that is supposed to solve my problem:

    /* Background Image on link pages */
    .body.page-id-490 {
        background-image: url('https://test-site.com/wp-content/uploads/2023/03/background-image.jpg');
    }

    The page ID from that page (ID 490) I got from the inspector. But it doesn’t work so I suppose I did something wrong here.

    #2568845
    Ying
    Staff
    Customer Support

    Hi there,

    There’s an extra . before body.

    Try this:

    /* Background Image on link pages */
    body.page-id-490 {
        background-image: url('https://test-site.com/wp-content/uploads/2023/03/background-image.jpg');
    }
    #2568888
    scometamus

    This unfortunately did not solve the issue. There still doesn’t appear any background image.

    #2568899
    Leo
    Staff
    Customer Support

    Might be the wrong quoation mark.

    Can you try this instead?

    /* Background Image on link pages */
    body.page-id-490 {
        background-image: url("https://test-site.com/wp-content/uploads/2023/03/background-image.jpg");
    }

    Please disable clear and disable any caching or optimization plugins if this still doesn’t work – we would need to inspect the code.

    #2568909
    scometamus

    Changing ‘ to ” did not change anything unfortunately.

    I emptied the cache and then disabled Autoptimize. Let me know how can I further assist finding the issue.

    #2568947
    Leo
    Staff
    Customer Support

    Where are you adding the CSS? It’s simply not showing up in the page source at all.

    #2568957
    scometamus

    Via the child theme. I see changes I make there though! This is odd!

    #2568991
    Ying
    Staff
    Customer Support

    In your other topic, I provided the below CSS, but there’s a { missing after @media (min-width: 1025px), please try adding the { to check.

     /* Artist Rooster centered */
    @media (min-width: 1025px)
    .home .entry-content {
        display: flex;
        align-items: center;
        min-height: 100vh;
        flex-wrap: wrap;
        justify-content: center;
    }
    }
    #2569026
    scometamus

    Didn’t work unfortunately. Updated the complete css code privately.

    #2569104
    Ying
    Staff
    Customer Support

    Not able to get the file to work.

    Can you just link me to your site?

    #2569111
    scometamus

    Sure, attached.

    #2569158
    Ying
    Staff
    Customer Support

    Your content background color is set to white in the customizer, the color sits on top of the body background, so you are not able to see the body background image.

    #2569175
    scometamus

    I see, that’s getting too complicated then. I just moved to a simple background color (instead of an background image) for now. Thanks!

    #2569334
    Ying
    Staff
    Customer Support

    Maybe try adding this CSS so set the homepage’s content area background color to transparent.

    .home .site.container {
        background-color: transparent;
    }
Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.