Skip to content

Instantly share code, notes, and snippets.

@jamiemitchell
Forked from craigsimps/functions.php
Created August 19, 2019 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamiemitchell/3e178f357a8073afc64f66803fcc582b to your computer and use it in GitHub Desktop.
Save jamiemitchell/3e178f357a8073afc64f66803fcc582b to your computer and use it in GitHub Desktop.
<?php
add_action( 'genesis_meta', __NAMESPACE__ . '\\remove_redundant_markup' );
/**
* Remove the redundant .site-inner and .content-sidebar-wrap markup.
*
* @since 1.0.0
*/
function remove_redundant_markup() {
// Remove .site-inner everywhere.
add_filter( 'genesis_markup_site-inner', '__return_null' );
// Remove .content-sidebar-wrap only when we're using full width content.
if ( 'full-width-content' === genesis_site_layout() ) {
add_filter( 'genesis_markup_content-sidebar-wrap', '__return_null' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment