Skip to content

Instantly share code, notes, and snippets.

@braddalton
Forked from GaryJones/functions.php
Last active December 16, 2015 04:09
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 braddalton/5374564 to your computer and use it in GitHub Desktop.
Save braddalton/5374564 to your computer and use it in GitHub Desktop.
add_action( 'genesis_after_sidebar_widget_area', 'child_split_sidebars' );
/**
* Add two sidebars underneath the primary sidebar.
*
* @since 1.0.0
*
* @author Gary Jones
* @link http://code.garyjones.co.uk/genesis-split-sidebars
*/
function child_split_sidebars() {
?>
<div class="sidebar-bottom">
<div class="sidebar-bottom-left">
<?php dynamic_sidebar( 'sidebar-bottom-left' ); ?>
</div><!-- end .sidebar-bottom-left -->
<div class="sidebar-bottom-right">
<?php dynamic_sidebar( 'sidebar-bottom-right' ); ?>
</div><!-- end .sidebar-bottom-right -->
</div><!-- end .sidebar-bottom -->
<?php
}
// Register the sidebars with WordPress
genesis_register_sidebar(
array(
'id' => 'sidebar-bottom-left',
'name' => __( 'Sidebar Bottom Left', 'theme-text-domain' ),
'description' => __( 'This shows up underneath the primary sidebar.', 'theme-text-domain' ),
)
);
genesis_register_sidebar(
array(
'id' => 'sidebar-bottom-right',
'name' => __( 'Sidebar Bottom Right', 'theme-text-domain' ),
'description' => __( 'This shows up underneath the primary sidebar.', 'theme-text-domain' ),
)
);
.sidebar-bottom-left,
.sidebar-bottom-right {
display: inline;
float: left;
width: 212px;
}
.sidebar-bottom-right {
float: right;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment