0

I apologise if I'm asking something which has been previously covered - but I've not been able to find an answer.

In updating a classic theme for personal use, I considered dispensing with the header.php and footer.php templates, and including the wp_head() and wp_footer() calls in the correct locations within my existing 'pre-loop' and 'post-loop' custom templates.

But I then read about potential problems with plugin compatibility - suggesting that some plugins (expecting header.php and footer.php to be present in the theme root) might use hardcoded paths to them. From my very limited amateur knowledge, this seems unlikely as header.php and footer.php aren't required by WordPress.

Advice appreciated - please and thankyou.

1 Answer 1

1

I believe that it should be fine for themes to not have header.php or footer.php files. Block themes generally do not have these files. For example Twenty Twenty-Four, a theme built by the WordPress team.

If a plugin errors because a theme does not have the aforementioned files, then I would chalk it to some naivety in the way the plugin was coded and would avoid said plugin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.