Skip to content

Instantly share code, notes, and snippets.

@cdils
Created September 15, 2013 12:50
Show Gist options
  • Save cdils/6570512 to your computer and use it in GitHub Desktop.
Save cdils/6570512 to your computer and use it in GitHub Desktop.
Conditional Examples.
add_action( 'get_header', 'cd_change_genesis_sidebar' );
function cd_change_genesis_sidebar() {
if ( 'Author Display Name' == get_the_author() ) {
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
add_action( 'genesis_sidebar', 'cd_do_sidebar' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment