How to add header and footer to custom pages

Hello,

I am using X.
I got a nice header and footer on my Pages.
I have a custom plugin generating custom pages (using twig), I would like them to include the same header and footer.
How to do that ?

Before i was just using get_header() and get_footer() but since I updated X to the last version this is not working anymore.
I mean those function are working opening and closing body tag for example but I don’t have the header and footer I have on “normal” pages (I mean those that I do in Pages in Wordpress admin)

Hope you can help me,
Best regards.

Hi There,

Thank you for writing in, this seems to be an issue with your plugin as get_header(); and get_footer(); works with X and PRO theme you can see that on the page template files.

Please try the solution provided here (https://theme.co/apex/forum/t/how-to-call-x-header-and-footer-from-code/6097/5)

Hope that helps,
Cheers!

get_header(); and get_footer(); worked fine with old version of X (no child theme) but not with the new version.
Any idea what changed ? and how to get around ?

Hi @max38320,

It should be working well because there are no changes to recent structure X theme. I could not guarantee you that we could help you with this concern because this is beyond the scope of our support and it is a 3rd party plugin conflict. We cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.

However we could try check why it is not working, please share us details on how you created the page and inside or codes of your custom page.

Thank you so much for understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.