WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Altering backgrounds in twenty eleven theme

[Resolved] Altering backgrounds in twenty eleven theme

  • Hey. Here’s my site http://www.musicofthespheresgame.com

    What I’m trying to do is make it so that the different pages (accessible along the top bar) have different backgrounds.

    Google has taken me to numerous tutorials that look at this. Most of them are to do with editing body.page-id-9 in style.css. That doesn’t seem to be possible at all though, because in the 2011 theme, the background isn’t set there. It appears to be set in a place that you only have access to with the “appearance->background” functionality. I’ve tried putting a lot of stuff in style.css, and it never works, even when I tell “appearance->background” that I don’t want it to show a background.

    Is there anything else I can do? Or is there something I’m missing?

Viewing 5 replies - 1 through 5 (of 5 total)
  • I have *always* had “<body <?php body_class(); ?>>” written in header.php.

    One thing that I’ll say I’ve just discovered is that going to the source of the webpages, that phrase does NOT appear. The body tag has a load of different stuff in it. But I can’t find that part of the source anywhere in my code.

    Moderator Andrew Nevins

    @anevins

    Forum moderator

    Are you familiar with CSS?

    Michael

    @alchymyth

    Forum Moderator

    the custom option in dashboard – appearance – background is writing (embedding) the styles into the head section, therefore it is more specific, and you might need to use !important with your page specific body background styles.

    or instead of !important try styling:
    body.custom-background.page-id-9 { .. }

    additionally, your background image url /wp-admin/uploads/2012/08/random-patterns.png is not found – possibly needs to be /wp-content/uploads/...

    this might work:
    background-image: url('http://www.musicofthespheresgame.com/wp-content/uploads/2012/08/random-patterns.png')!important;

    Dude, I owe you many, many drinks. A combination of the second and third solutions sorted me out fine – I didn’t have to use !important.

    What ever they pay you guys, it isn’t enough.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Altering backgrounds in twenty eleven theme’ is closed to new replies.
Skip to toolbar