• 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

Add Class on main wrap?

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 › Add Class on main wrap?

This topic is: resolved
  • This topic has 2 replies, 2 voices, and was last updated 12 years, 10 months ago by sangfroidweb.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • June 19, 2013 at 4:09 pm #46817
    sangfroidweb
    Participant

    I don't see that this is possible.. but before I hack in something silly I wanted to see if I overlooked something. I want to add a css class to the main wrap.. turning this:

    <div id="wrap">

    into this:

    <div id="wrap" class="myclass">

    Doable?


    Liz or Eddy @SangFroid Web — Customizing StudioPress themes at http://www.wpstudioworks.com and building custom Genesis Child themes for businesses at http://www.sangfroidwebdesign.com 🙂

    June 19, 2013 at 9:18 pm #46838
    AnitaC
    Keymaster

    I don't think you can if that's the main wrap. Traditionally you have:

    #Wrap
    ... and inside there you have

    #header
    #nav
    #inner
    #footer

    ... etc. etc. - each having their own wrap.


    Need help with customization or troubleshooting? Reach out to me.

    June 19, 2013 at 10:02 pm #46849
    sangfroidweb
    Participant

    Anitac,

    I think you're right.. I was just putting it out there in case. Given it's the global wrap, I think it would be useful, for instances where you want the whole page to style a certain way. I would like the ability to add a class based on some condition, and then style the css for that class accordingly. If anyone else ever needs this.. I ended up adding another global wrap inside this one, via genesis_before_header and genesis_after_footer hooks.. then apply my class to that wrap instead.


    Liz or Eddy @SangFroid Web — Customizing StudioPress themes at http://www.wpstudioworks.com and building custom Genesis Child themes for businesses at http://www.sangfroidwebdesign.com 🙂

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Add Class on main wrap?’ 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

© 2026 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