• 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 custom class to structural layout elements

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 › Add custom class to structural layout elements

This topic is: not resolved

Tagged: custom css, structure

  • This topic has 3 replies, 2 voices, and was last updated 11 years, 12 months ago by David Chu.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • October 23, 2014 at 1:48 pm #128883
    badlydrawnben
    Member

    Hi,

    In order to integrate some third-party grid systems, I'd like to add a custom css class to the standard .site-container .content .sidebar etc elements - so for example it would produce the code

    <aside class="sidebar sidebar-primary widget-area col-3">

    instead of

    <aside class="sidebar sidebar-primary widget-area">

    I can't see any Genesis hooks or functions that make this is possible though.

    Any ideas?

    Thanks,

    Ben

    http://#
    October 24, 2014 at 9:47 am #128978
    David Chu
    Participant

    Hi,
    I've become the semi-official Twitter instructor on this topic. ๐Ÿ™‚

    Check this Gist out. In the notes you'll see where you can find out where more attributes can be played with. New attributes can be placed all over, making it easier to incorporate Bootstrap and so on.

    Note the concatenation and space before the class. If you don't have that, you'll blow away the other classes, causing significant visible results. ๐Ÿ™‚

    Cheers, Dave


    Dave Chu ยท Custom WordPress Developer – likes collaborating with Designers

    October 24, 2014 at 12:13 pm #128989
    badlydrawnben
    Member

    That's brilliant - thanks Dave. With my own name in the function and everything!

    Much appreciated,
    Ben

    October 24, 2014 at 1:09 pm #128998
    David Chu
    Participant

    Ben,
    You're welcome, glad you enjoyed it! Hope you make something cool with it.

    Dave


    Dave Chu ยท Custom WordPress Developer – likes collaborating with Designers

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ 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

© 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