Remove .site-inner and .content-sidebar-wrap markup

If I’m working on a site which has a single column content area (like this one) then I like to remove all of the redundant markup surrounding the main content area.

The code below will remove .site-inner everywhere, and remove .content-sidebar-wrap on full width pages.

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' );
view raw functions.php hosted with ❤ by GitHub

Reader Interactions

Leave a Reply

Your email address will not be published.