-
-
Save riskiii/2015035 to your computer and use it in GitHub Desktop.
Genesis: Split Sidebars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ), | |
) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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