"Fix your theme"-error

Hi! I get these error messages in Themes-section, and I don’t know what to do, or what’s caused them. The site seems to work as normal (hopefully).

The website in question: https://horseriding-holidays-andalucia.com/

Hello Minna,

Thank you for writing in, that’s an error coming from your plugin or tools that check if the theme has valid or following the Wordpress standard. The problem is, it expects to see them only on a specific location. The wp_head() and wp_footer are Wordpress standard function that can be placed anywhere just as long as they belong to the same group (header or footer).

Our theme uses header.php and footer.php, but it has sub templates to properly separate different parts of the header and footer. The wp_head() and wp_footer are implemented to one of these sub-templates.

So basically, that tool only expects that you have one complete template of header.php and footer.php.
And that analysis is very inaccurate. Because even Wordpress has https://developer.wordpress.org/reference/functions/get_template_part/ that allows the use of sub-templates.

The everything should work properly, and you can ignore that error notice.

Hope this shed some light.

Cheers!

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