This code handles the sidebar:
add_action( 'genesis_sidebar', 'genesis_do_sidebar' );
/**
* Echo primary sidebar default content.
*
* Only shows if sidebar is empty, and current user has the ability to edit theme options (manage widgets).
*
* @since 1.2.0
*/
function genesis_do_sidebar() {
if ( ! dynamic_sidebar( 'sidebar' ) && current_user_can( 'edit_theme_options' ) ) {
genesis_default_widget_area_content( __( 'Primary Sidebar Widget Area', 'genesis' ) );
}
}
You can unhook genesis_do_sidebar
from genesis_sidebar
, then wire up your own sidebar function to prevent the default content from being output:
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
add_action( 'genesis_sidebar', 'wpse_genesis_do_sidebar' );
/**
* Outputs widgets for sidebar without default content.
*/
function wpse_genesis_do_sidebar() {
dynamic_sidebar( 'sidebar' );
}