To remove the header from the page completely from the DOM, you need the following code:
add_action( 'genesis_title', 'cw_remove_header_right_widget', 9 );
function cw_remove_header_right_widget() {
remove_action('genesis_header', 'genesis_header_markup_open', 5);
remove_action('genesis_header', 'genesis_do_header');
remove_action('genesis_header', 'genesis_header_markup_close', 15);
}
Remove header on home page in Genesis
With the following code, you can remove the header element on the home page:
add_action( 'genesis_title', 'cw_remove_header_right_widget', 9 );
function cw_remove_header_right_widget() {
if ( is_front_page() ) {
remove_action('genesis_header', 'genesis_header_markup_open', 5);
remove_action('genesis_header', 'genesis_do_header');
remove_action('genesis_header', 'genesis_header_markup_close', 15);
}
}
Note: The code was tested with the Genesis sample theme. Should work for most Genesis themes though.