• 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

Remove structural wrap only in a specific template

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 › Remove structural wrap only in a specific template

This topic is: not resolved

Tagged: filters, structural wraps

  • This topic has 2 replies, 2 voices, and was last updated 6 years, 11 months ago by capiedge.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • June 8, 2018 at 4:47 pm #220685
    capiedge
    Member

    I'm tryng to remove the site-inner wrap only in a specific template, through the filter "genesis_theme_support_structural_wraps" (declared in the init.php file of the genesis framework), declaring it inside the template file. That is:

    add_filter( 'genesis_theme_support_structural_wraps', 'remove_wrap_from_siteinner' );
    function remove_wrap_from_siteinner( $structural_wraps ) {
    	
    	$structural_wraps = array_diff($structural_wraps, array('site-inner'));
    	return $structural_wraps;
    
    }

    But nothing happens. The wrap doesn't dissapears.
    What I'm doing wrong? Is there another way to get it?

    Thank you all.

    June 9, 2018 at 4:49 am #220692
    Victor Font
    Moderator

    Try adding this to the template:

    Look at your child theme's functions.php. Structural wraps are declared using something like this:

    add_theme_support( 'genesis-structural-wraps', array(
        'header',
        'menu-primary',
        'menu-secondary',
        'site-inner',
        'footer-widgets',
        'footer'
    ) );

    To remove the site-inner, first use remove_theme_support for all the structural wraps declared in functions.php and add the ones you want to use back in with add_theme_support.

    This may help you understand structural wraps and dynamic filters: https://victorfont.com/understanding-genesis-dynamic-apply_filters-part-1/


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    June 10, 2018 at 3:57 am #220705
    capiedge
    Member

    Many thanks Victor!

    I found an even easier way to accomplish it:

    //Remove selectively the site-inner wrap
    add_filter('genesis_structural_wrap-site-inner', '__return_null');

    Regards.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 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

© 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