I am trying to change the header template using the get_header
action but it wont change anyway I try to do it.
Here is what I tried by adding this in functions.php:
function prefix_new_header() {
return 'newtmpl';
}
add_action( 'get_header', 'prefix_new_header' );
I have in the theme folder a file called header-newtmpl.php
I’ve tried different priorities (1, 10, 99), but it doesn’t work.
Is there something I am missing? Thanks for any help!
You can try this in twentysixteen, if you want to test it.