Different background for different pages

  • marica

    #2793

    Hi, happy new year!

    I’ve a question: is it possible to have a different background image for different pages? I’ve tried to put this

    .page-id-11{
    background: #000000
    url(http://www.stefanoagostinelli.it/wp-content/uploads/2011/12/laband.png);
    background-repeat:no-repeat;
    background-position:top center;
    }

    on style.css but nothing happens!

    Can somebody help me?

    Tnx

    Prasanna SP

    #19244

    It needs some php work. Perhaps this could give you some ideas – http://wordpress.org/support/topic/change-background-image-per-page-1#post-1298054

    marica

    #19245

    Thanx Prasanna, unfortunately I’m not so skilled in php! I tried to follow the suggestions found at your link, but it doesn’t work. Maybe because I really don’t know where I have to insert the conditional statements.. I’ve tried to put it in index.php and loop.php too but nothing happens. Do you have any suggestions?

    Josh

    #19246

    Prasanna SP

    #19247

    That should go in header.php. But, I think the simplest solution is to use the plugin that Josh mentioned above.

    marica

    #19248

    Thanx both, maybe my explanation was not clear. I mean: different “Post and pages content background” for different pages.

    Prasanna SP

    #19249

    You mean post background??

    If so, try this,

    .post-11{
    background: url("http://www.stefanoagostinelli.it/wp-content/uploads/2011/12/laband.png") no-repeat;
    background-position:top center;
    }

    Prasanna SP

    #19250
    .post-11 {
    background: url("http://www.stefanoagostinelli.it/wp-content/uploads/2011/12/laband.png") no-repeat;
    }

    marica

    #19251

    Yes Prasanna, I mean post background! I put your code in style.css but nothing happens 🙁

    Prasanna SP

    #19252

    Try this, (if it don’t work in style.css, add the code in Graphene options –> display –> custom css)

    Edited code:

    .post-11{
    background: #000000;
    background-image:
    url("http://www.stefanoagostinelli.it/wp-content/uploads/2011/12/laband.png");
    background-repeat:no-repeat;
    background-position:top center;
    }
Viewing 10 posts - 1 through 10 (of 13 total)

You must be logged in to reply to this topic.