Error Message on theme Editor

Hello,
For unknown reasons to me, everytime I go to the appearance tab of my wordpress backend, I get this message:

Error : Please fix your theme to make plugins work correctly: Go to the Theme Editor and insert <?php wp_head(); ?> just before the line of your theme’s header.php file.

Error : Please fix your theme to make plugins work correctly: Go to the Theme Editor and insert <?php wp_footer(); ?> as the first line of your theme’s footer.php file.

Also, Iframes stopped working within the content area of my page, but still work fine in the footer, they display on the pro front end but disappear on the live website. AFter exploring the source code, the iframe tag is correct and there, but it is just not populating the content…

I’m a little lost, any help would be greatly appreciated! :slight_smile:
thx

Hi Nicholas,

Thank you for writing in, what is the content of your <iframe> some widgets can not have a preview on the Content Builder. If it is a Map, please use the Map Element (embed type), if it is a video use the Video Element (embed type), If it is a form please your Raw Content element or Content Area element.

Regarding the errors, are you getting this message from a plugin? Please be informed that we have a different templating system that still follows the WordPress standards. You cannot find wp_head() or wp_footer() in the header.php or footer.php because we use stacks. Those functions were added at the other header files. Please ignore that message. The plugins should work with no issues as expected to be.

Cheers!

Thx for the quick reply!

I have mainly 2 types of content in my iframe, forms from Pardot and youtube videos (I actually use the video element), they both don’t show…

As for the error messages, I can’t tell if it is from a plugin or not, this is what I see:

I’m also in touch with my hosting provider, there might be an error with domains…

Hi Nicholas,

That’s an error coming from your plugin or tools that checks if the theme has valid or following the Wordpress standard. The problem is, it expects to see them only on specific location. The wp_head() and wp_footer are Wordpress standard function that can be place anywhere just as long as they are 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 those sub-templates.

So basically, that tool only expect 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.

Thanks!

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