Get_header() not working

I’ve created a child theme and my own template-blank-4.php for the Renew stack. I’ve created a page using this template and all work well:

I also have a plug-in that creates posts that uses exactly the same template-blank-4.php and this is not rendering a header (or footer). I’ve included some PHP in that template as a test to show the template, stack etc and they appear to be identical. I have ensured the postmeta for the custom post type is correct for this template (or at lest I think I have). Therefore something else must be different to make get_header() not render a header for my custom post type.

Here’s an example of the custom post:

Any suggestions as to why my custom post type that uses this template doesn’t have a header/footer?

Thanks
Martin

Hey Martin,

I created a custom post type in my test site and add single-test.php directly under the child theme folder and pasted the page template code in there and the header and footer are displayed.

This just means that there’s something beyond our theme that is preventing the header and footer to show up. Try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

If that doesn’t help, please review your PHP.

Please note that we do not provide customization support. If your custom code still doesn’t work, you need to consult with another developer to your custom template.

Thanks.

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