• 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

Background colour on single posts

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 › General Discussion › Background colour on single posts

This topic is: not resolved

Tagged: css, post, single, styling

  • This topic has 5 replies, 3 voices, and was last updated 11 years, 7 months ago by deejuk.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • October 29, 2013 at 3:32 pm #69746
    deejuk
    Member

    Hi all

    Hope someone can help with this.

    I have been able to style up custom pages fine. And even added styling to a category no problem using the css

    .category-9 .site-container {
    background: blue;
    }

    However I have read the wordpress codex and it states that the styling for the category should be inherited by the single posts in that category. But no.

    I have tried always. to change the .site-container element for a single post to no avail.

    Can anyone please help me resolve this .. I have tried it on another Genesis site of mine and it does the same thing...fails to inherit the category styling.


    WN6 Web Design – North West of England

    http://#local
    October 29, 2013 at 4:02 pm #69753
    nutsandbolts
    Member

    Here's a plugin that would probably make it easy to do what you want to do: http://www.wphub.com/wp-post-styling-wordpress-plugin/

    If you don't want to use a plugin, you would probably have to target each post individually by its ID, though you could list all IDs from a particular category together and set one CSS rule.


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    October 29, 2013 at 4:35 pm #69761
    deejuk
    Member

    Thank you for that I feared it would be a plugin or listing posts individually. It's genesis I am using by the way


    WN6 Web Design – North West of England

    October 30, 2013 at 12:35 pm #69952
    deejuk
    Member

    For the record on this I am using Cobolt Dynamik to achieve this. You can set a label in Dynamik and then add CSS directly in a CSS hook. When you edit the post you can then select the label with the styling on and it applies it to just that post.

    It seems single posts don't inherit the category styling for some reason, but this is a decent work around if you either have Dynamik or know conditional hooks etc.


    WN6 Web Design – North West of England

    October 30, 2013 at 2:14 pm #69977
    olivier.moreau
    Member

    It's not clean or recommended but you could simply put your CSS right into the content of the post (inline CSS).
    In the text editor put :
    <div style="background-color:blue;"> your text </div>

    October 30, 2013 at 2:32 pm #69981
    deejuk
    Member

    Thank you for the reply .. it does work thank you.

    Shame it simply won't pick up the category styling but hey


    WN6 Web Design – North West of England

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘General Discussion’ is closed to new topics and 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