Change background Image on one page – Expose Theme

Community Forums Forums Design Tips and Tricks Change background Image on one page – Expose Theme

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Marcy 6 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #64932

    tigaruk
    Participant
    Post count: 6

    I want to change the background image used on just one page.

    I’ve already tried

    if(is_page(5621)){
    background:url(http://kyandiicards.com/wp-content/uploads/2013/07/background-174×300.gif);
    }

    But that does nothing even though it should work. Even plugins are failing to work to change the background for a certain page.

    Thanks

    http://kyandiicards.com/fuzzballs
    #64958

    Marcy
    Participant
    Post count: 277

    You have to tell it which selector to use for the background image. You can do this in your style.css

    Right now you have a section that I think was created when you uploaded a custom background in your WordPress Dashboard or Theme Customization.

    body.custom-background {
        background-attachment: scroll;
        background-color: #F4F1E9;
        background-image: url("http://kyandiicards.com/wp-content/uploads/2012/06/background.gif");
        background-position: left top;
        background-repeat: repeat;
    }

    You can add a new selector for the page id you want in your style.css or in a Custom CSS plugin:

    body.page-id-5621 {
         background: #f4f1e9 url(<a href="http://kyandiicards.com/wp-content/uploads/2013/07/background-174×300.gif" rel="nofollow">http://kyandiicards.com/wp-content/uploads/2013/07/background-174×300.gif</a>) top left repeat !important;
    }

    I think you will need the !important to override the custom background.


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.