Skip to content

Instantly share code, notes, and snippets.

@riskiii
Forked from GaryJones/functions.php
Created March 11, 2012 04:28
Show Gist options
  • Save riskiii/2015035 to your computer and use it in GitHub Desktop.
Save riskiii/2015035 to your computer and use it in GitHub Desktop.
Genesis: Split Sidebars
<?php
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