cipher442
cipher442

Reputation: 41

get_header() not working in a custom page template

I am using a child theme. In my child theme folder I have the following files:

child theme directory structure

In my custom page template "page-lp3.php" I'm using get_header('blank') to call a custom header template. But no matter what I do, it reverts to the child-theme's header.php file not header-blank.php as intended.

This is the code in "page-lp3.php":

<?php

/*
Template Name: LP3
*/

get_header('blank');

?>

The custom template is activated for that page in WordPress. And the changes I make to the custom template are working as expected. But the custom header is not cooperating. What am I doing wrong?

Upvotes: 0

Views: 1283

Answers (2)

MANOJ VASHIST
MANOJ VASHIST

Reputation: 108

I think you do something wrong inside the "header-blank.php" How to debugging error 1 . Call default header if that come copy default header code into your new header-black.php and check. 2. add die with some message inside new header file and check 3 remove cache of browser

Upvotes: 0

MANOJ VASHIST
MANOJ VASHIST

Reputation: 108

Check the error logs files of your project and removes errors first.

Upvotes: 0

Related Questions