Opened 4 months ago
Last modified 4 months ago
#58914 new defect (bug)
Full-site editing theme warning about missing header.php
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | minor | Version: | 6.2.2 |
Component: | Themes | Keywords: | |
Focuses: | Cc: |
Description
When using a theme compatible with full site editing, I get this warning from time to time when the page is redirecting. This can be replicated also in WordPress 6.3-RC2-56310 running Twenty Twenty-Three theme.
Deprecated: File Theme without header.php is deprecated since version 3.0.0 with no alternative available. Please include a header.php template in your theme. in /public/wp-includes/functions.php on line 5653
Change History (2)
#2
in reply to:
↑ 1
@
4 months ago
Replying to rajinsharwar:
I think, twenty twenty-three is a block theme. Can you check if using the below code resolves the warning you are getting?
if( wp_is_block_theme() ) { block_template_part('header'); } if( wp_is_block_theme() ) { block_template_part('footer'); }
Not sure I understand what you meant by that.
The theme itself does not have a header.php file at all, this is the theme structure. https://imgur.com/45G7OkU
To me, this looks like a bug, to get a warning about the theme not having a header.php file when the official theme does not have one. What am I missing?
I think, twenty twenty-three is a block theme. Can you check if using the below code resolves the warning you are getting?
if( wp_is_block_theme() ) { block_template_part('header'); } if( wp_is_block_theme() ) { block_template_part('footer'); }