Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created January 6, 2014 19:18
Show Gist options
  • Save billerickson/8288152 to your computer and use it in GitHub Desktop.
Save billerickson/8288152 to your computer and use it in GitHub Desktop.
<?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