On Genesis themes, the structural .wrap is essentially an element which acts as a container for content. The sample and most of the themes have it set at 1140px wide and narrower at smaller sizes.
What areas have the .wrap markup by default are:
- header
- menu-primary
- menu-secondary
- footer-widgets
- footer
You can see this markup in the core Genesis framework at genesis/lib/init.php line 62-64
//* Maybe add support for structural wraps if ( ! current_theme_supports( 'genesis-structural-wraps' ) ) add_theme_support( 'genesis-structural-wraps', array( 'header', 'menu-primary', 'menu-secondary', 'footer-widgets', 'footer' ) );
So the code is saying if the current theme doesn’t support Genesis Structural Wraps then add the support for the elements in the array.
So if you wanted to remove the .wrap lets say from the primary menu from your own theme you would add the theme support function without the menu-primary to your functions.php file.
6 comments
Lord
Thanks! It worked for the menu, but not the site-header. Any idea? Thanks!
Deb
Thank you for sharing the code.
Ginger Coolidge
OK, this is too funny — I am writing a tutorial for a Genesis theme and I wanted to look up the definition for structural wraps. Who knew searching on the term would send me here, to my own comment almost exactly one year later!
Neil Gowran
Deja vu
Ginger Coolidge (@gscoolidge)
Thanks for the post! Question — can you give an example of a use-case where you’d want to remove a structural wrap? What are the benefits?
Neil Gee
One instance may be when you want full width segments on a page without being contained, meaning they go edge to edge of the viewport, in this case you can remove the .site-inner wrap, this would be beneficial in a page builder like Beaver Builder of if you were just hand coding it.