• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Custom Page/Post backgrounds

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Custom Page/Post backgrounds

This topic is: resolved

Tagged: backgrounds, css

  • This topic has 2 replies, 2 voices, and was last updated 12 years, 5 months ago by john scheine.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • June 22, 2013 at 11:27 am #47191
    john scheine
    Member

    This is what I am trying to accomplish, without adding any additional Plugins:

    I would like my blog post background colors to be different then my page background colors. (We are not talking about the content area as i've already used css on individual pages to make them black while posts are white background in the content area)

    Here is an example of a blog page: http://www.longislandmarketingcompany.com/10-examples-brand-facebook-covers/
    Here is a page example: http://www.longislandmarketingcompany.com/about-long-island-marketing-company/

    This is the css portion of the code used to change the content area background on individual pages. (required additional code added to php) Posts are not controlled by individual coding.

    /* Change Content Area Background Color – Post or Page */

    body.page-id-95 #content {
    background: #000;
    }

    body.page-id-39 #content {
    background: #000;
    }

    Note: This is done for all pages. (would be redundant to paste all of it)

    How do I accomplish the same thing through css/php but for the page backgrounds on individual pages?
    Thank you for your help. Hopefully I'm being clear on what I am trying to accomplish.

    http://www.longislandmarketingcompany.com/
    June 22, 2013 at 3:06 pm #47211
    Chris Cree
    Participant

    You don't have to list each page by ID number. You can just use one entry:

    body.page #content {
    background: #000;
    }

    and it would cover all pages. That way you don't have to keep updating your stylesheet every time you add a new page.

    Which div are do you want to change the background color for?

    If it is the body div then you can do something like this:

    body.page {
    background: #f00;
    }
    
    body.single {
    background: #00f;
    }
    

    Since you have a custom background color you may need to add that class to the selector. For example:

    body.page.custom-background {
    background: #f00;
    }
    June 22, 2013 at 7:03 pm #47239
    john scheine
    Member

    Thank you. I should of came here first, google search ended up making me do more work then necessary. The last one did the trick.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Custom Page/Post backgrounds’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble