WordPress.org

Make WordPress Core

Opened 19 months ago

Last modified 19 months ago

#42921 new defect (bug)

get_header('customheadername') is fetching the header.php even i have provided customheadername

Reported by: mausamrai Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.1
Component: Themes Keywords: reporter-feedback
Focuses: template Cc:

Description

get_header() is not supporting the custom headername provided. so fetching default header.php

Change History (2)

#1 @Compute
19 months ago

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/

#2 @johnbillion
19 months ago

  • Keywords reporter-feedback added
Note: See TracTickets for help on using tickets.