Skip to content

Instantly share code, notes, and snippets.

@craigsimps
Created March 15, 2018 16:26
Show Gist options
  • Save craigsimps/3dc9244b21af6029cc80470f541a56b4 to your computer and use it in GitHub Desktop.
Save craigsimps/3dc9244b21af6029cc80470f541a56b4 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