Skip to content

Instantly share code, notes, and snippets.

@icreatesolutions
Created January 13, 2016 23:27
Show Gist options
  • Save icreatesolutions/b64c4984e069160d2901 to your computer and use it in GitHub Desktop.
Save icreatesolutions/b64c4984e069160d2901 to your computer and use it in GitHub Desktop.
Genesis Custom Sidebar
<?php
add_action('get_header','icreate_change_genesis_sidebar');
function icreate_change_genesis_sidebar() {
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); //remove the default genesis sidebar
add_action( 'genesis_sidebar', 'icreate_do_cpt_sidebar' ); //add an action hook to call the function for my custom sidebar
}
function icreate_do_cpt_sidebar() {
genesis_widget_area( 'search-sidebar' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment