• 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

Wraps and the likes

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 › Wraps and the likes

This topic is: resolved

Tagged: associate, wraps

  • This topic has 9 replies, 2 voices, and was last updated 13 years, 8 months ago by SoZo.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • January 29, 2013 at 4:12 pm #16152
    NWTD
    Member

    This is kind of a two part question but the relate to each other.

    First:
    I'm using the Associate theme and am trying to customize the slider and home middle widgets. I'd like to take them out of the 'inner' div and put them in a new div of there own in between the 'nav' and 'inner' called something to the affect of 'featured'
    Second:
    I also noticed in the functions.php there is a bit of code for including elements into a wrap:
    /** Add support for structural wraps */
    add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer' ) );

    Is it possible to us the genesis-structural-wraps to create different divs for grouping items? For instance, I'd want to group the 'header', 'nav', 'subnav', and 'featured' into one wrap, then 'inner' in another and lastly the 'footer-widgets' and 'footer' in their own.
    The only purpose behind this is to accomplish some background customizations that are full width for these different sections.

    TIA!

    January 29, 2013 at 4:20 pm #16162
    SoZo
    Member

    No, that isn't what the structural wraps do.

    If you want to move those elements out of the inner div you'd need to put them in a function using the after_header hook. Or of course change the hook that the existing function uses and move the home bottom sidebars into a different function.


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    January 29, 2013 at 4:30 pm #16167
    NWTD
    Member

    Thanks John. I moved the slider around like I needed.

    Do you have any suggestions for me to group the different sections into individual wraps of sorts?

    January 29, 2013 at 4:32 pm #16168
    SoZo
    Member

    You can use the hooks to add opening and closing div tags that you can't add directly in the template markup. e.g. add an opening tag in before_header and then a closing tag after your featured div.


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    January 29, 2013 at 4:55 pm #16177
    NWTD
    Member

    is it as simple as

    function add_div() { echo 'div class="header-wrap">'}
    add_action( 'genesis_before_header', 'add_div' );

    ?

    I'm still new to genesis and learning it as I go. Thanks for your help John

    January 29, 2013 at 4:59 pm #16179
    SoZo
    Member

    Yep, but your missing the semi-colon at the end of the echo line

    function add_div() { echo 'div class="header-wrap">'; }
    

    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    January 29, 2013 at 5:03 pm #16181
    NWTD
    Member

    Awesome. thanks!

    One last thing. By default, everything under <body> is wrapped in a div, called, well, "wrap". Can I use one of these hooks to remove that div completely?

    January 29, 2013 at 5:04 pm #16182
    SoZo
    Member

    No, just remove the width from the #wrap rule. And then you'll need widths and auto left/right margins for the containers you want to be centered.


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    January 30, 2013 at 2:18 pm #16495
    NWTD
    Member

    Awesome. I'm all set. thanks!

    January 30, 2013 at 2:22 pm #16499
    SoZo
    Member

    You're welcome 🙂


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Wraps and the likes’ 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