• 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 .site-inner from one page

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 .site-inner from one page

This topic is: resolved

Tagged: .site-inner, remove loop, slider

  • This topic has 3 replies, 2 voices, and was last updated 10 years, 8 months ago by Tonya.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • March 14, 2015 at 11:27 am #144403
    hmistler
    Member

    Hi again - on my homepage, I'm trying to get my slider to be the main content, flush with the bottom footers. In Firebug I can see that I still have a .site-inner in my html for the page, depsite running this code on my functions.php to remove the loop from this page:

    //Remove Loop from Home Page
    function thmeprefix_remove_homepage_content() {
    		if (is_page('20')) {
    			remove_action( 'genesis_loop', 'genesis_do_loop' );
    		}
    }
    
    add_action( 'genesis_before','thmeprefix_remove_homepage_content' );

    Is there something else I need to do to remove the .site-inner from my homepage so my slider sits flush with the bottom? THANKS!

    http://www.jpdevelopmentcorp.com/home/
    March 15, 2015 at 12:12 pm #144485
    Tonya
    Member

    Hello,

    Approach 1: Server-Side Approach

    .site-inner is actually added in genesis/header.php file at the bottom of the file. You can target it using the "genesis_markup{context}" filter as such:

    add_filter( 'genesis_markup_site-inner', 'tonya_remove_site_inner', 10, 2 );
    /**
     * If this is the targeted page, remove .site-inner by short-circuiting the
     * markup via the context.
     *
     * @since  1.0.0
     *
     * @see  genesis_markup() in genesis/lib/functions/markup.php for more information
     * 
     * @param  bool $short_circuit 	Set to false when passed in
     * @param  array $args   		Array of arguments.
     * @return string|bool      	Returns an empty string if this is the target page;
     *                              else, returns the $short_circuit.
     */
    function tonya_remove_site_inner( $short_circuit, $args ) {
    	return is_page( 20 ) ? '' : $short_circuit;
    }

    While you can technically do the above, it can be dangerous as it simply removes the structure of <div class="site-inner"></div>. It does not remove everything within .site-inner. To ensure on the server-side that nothing is loaded in the .site-inner container, you would need to repeat the above code for the other contextual elements found in genesis/lib/framework.php starting after get_header() down to get_footer().

    Approach 2: Client (browser) Approach
    Simply hide .site-inner in the DOM via CSS styling by doing the following:

    1) Within the page(s) you want to hide .site-inner, add a body class such as jpd_hide_site_inner (or whatever you want to call it). You add this in the metabox field within the Page (scroll down the page) in the Layout Settings metabox and its the field Custom Body Class.

    2) Next add the following CSS:

    body.jpd_hide_site_inner .site-inner {
        display: none;
    }

    Although .site-inner is still within the DOM, it is no longer visible in the browser and therefore, does not take up space.

    Cheers,
    Tonya


    Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
    Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp

    March 15, 2015 at 1:55 pm #144497
    hmistler
    Member

    Wow, thank you so much! that second option worked perfectly!

    March 15, 2015 at 2:03 pm #144505
    Tonya
    Member

    You're welcome!


    Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
    Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘remove .site-inner from one page’ 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

© 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