The next solution don’t like me but is an options:
Go to ‘wp-includes/general-template.php’ file and add:
$templates = apply_filters(‘replace_header’, $templates);
In the get_header function the final result function is:
function get_header( $name = null ) {
/**
* Fires before the header template file is loaded.
*
* The hook allows a specific header template file to be used in place of the
* default header template file. If your file is called header-new.php,
* you would specify the filename in the hook as get_header( 'new' ).
*
* @since 2.1.0
* @since 2.8.0 $name parameter added.
*
* @param string $name Name of the specific header file to use.
*/
do_action( 'get_header', $name );
$templates = array();
$name = (string) $name;
if ( '' !== $name ) {
$templates[] = "header-{$name}.php";
}
$templates[] = 'header.php';
$templates = apply_filters('replace_header', $templates); //This is the new line.
locate_template( $templates, true );
}
And before that you can:
function prefix_new_header() {
return 'header-newtmpl.php';
}
add_filter( 'get_header', 'prefix_new_header' );
I never modify the source code, I only put here one solution to the problem.
Original Source: http://stackoverflow.com/questions/39661295/get-header-action-not-working/39662513#39662513
Jose Carlos Ramos Carmenates