[wp-trac] [WordPress Trac] #55023: get_header() notice: Theme without header.php is deprecated
WordPress Trac
noreply at wordpress.org
Sat Jun 18 20:46:50 UTC 2022
#55023: get_header() notice: Theme without header.php is deprecated
--------------------------+------------------------
Reporter: kpdaa | Owner: audrasjb
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.1
Component: Themes | Version: 5.9
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: multisite
--------------------------+------------------------
Comment (by chandrapatel):
I was trying loading header and footer parts of block theme on signup page
using `block_header_area()` and `block_footer_area()` functions but having
some issues like some CSS was not loading and header and footer parts
looks broken. Currently, I don't know how CSS loads for block theme. I
have checked with 2022 theme. Header and footer parts in block theme do
not render `html`, `head` and `body` tags so I have tried those functions
in `header.php` and `footer.php` files in `wp-includes/theme-compat/`
folder for testing.
Those functions load main `header` and `footer` parts. In block theme,
user can add custom header and footer parts but since signup page is not
template, so user can't use custom header/footer parts.
To give support of block theme's header and footer parts for signup page,
- If active theme is block theme, then render `html`, `head` and `body`
tags and header & footer parts from block theme. Maybe add it directly to
`wp-signup.php` file or create template file in `wp-includes/theme-
compat/` folder.
- If active theme is classic theme, then call `get_header()` and
`get_footer()`.
I'm not sure whether it's correct approach. I think until block theme
support for signup page, don't throw deprecation warning if active theme
is block theme.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55023#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list