Issue with Implementing Consistent Header and Footer in Custom Page Template
-
Hello Support Team,
I am developing a website using the WordPress Twenty Twenty-Four theme. I have created a custom page template named
page-dashboard.php
and assigned it to a dashboard page that was set up in the WordPress admin.Issue Description: I am encountering an issue where I cannot apply the same header and footer to this
page-dashboard.php
as used by the rest of the theme’s pages. Typically, I would useget_header()
andget_footer()
functions to include the theme’s standard header and footer. However, these functions do not pull the correct block-based template parts (header and footer) defined by the theme.Attempts to Resolve:
- I tried using
get_header()
in my custom template, but it does not return the block-based header and footer, instead, it appears to load a default or incorrect version. - I have checked the code for any errors and also confirmed that the correct template file is being used.
Technical Details:
- WordPress Version: 6.6.1
- Theme: Twenty Twenty-Four (with Child theme)
- Custom Template File:
page-dashboard.php
Expected Outcome: I would like the
page-dashboard.php
to display the same header and footer as the other pages of the site which are controlled through the theme’s block template system.Could you please assist me in modifying my
page-dashboard.php
or suggest an alternative method so that it utilizes the theme’s block-based headers and footers correctly?Thank you for your assistance.
- I tried using
- The topic ‘Issue with Implementing Consistent Header and Footer in Custom Page Template’ is closed to new replies.