[wp-trac] [WordPress Trac] #42921: get_header('customheadername') is fetching the header.php even i have provided customheadername

WordPress Trac noreply at wordpress.org
Wed Dec 20 10:53:01 UTC 2017


#42921: get_header('customheadername') is fetching the header.php even i have
provided customheadername
--------------------------+------------------------------
 Reporter:  mausamrai     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Themes        |     Version:  4.9.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  template
--------------------------+------------------------------

Comment (by Compute):

 What is the name of your header file? The filename should be
 header-{$name}.php where $name is the argument you are using in
 get_header().

 Like `get_header( 'customheadername' )` should be `header-
 customheadername.php`.

 See: https://developer.wordpress.org/reference/functions/get_header/

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42921#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list