Created
January 6, 2014 19:18
-
-
Save billerickson/8288152 to your computer and use it in GitHub Desktop.
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_header', 'be_change_sidebar_order' ); | |
/** | |
* Swap Primary and Secondary Sidebars on Content Sidebar | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/switch-genesis-sidebars/ | |
*/ | |
function be_change_sidebar_order() { | |
if( 'content-sidebar' !== genesis_site_layout() ) | |
return; | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'genesis_do_sidebar' ); | |
add_action( 'genesis_sidebar', 'genesis_do_sidebar_alt' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment