Social Media plugins - errors

Hi!

I have installed Ultimate Social Media Plugin and they are asking to make samoe changes/

Error : Please fix your theme to make plugins work correctly. Go to the Theme Editor and insert the following string: <?php wp_head(); ?> Please enter it just before the following line of your header.php file: Go to your theme editor: click here.
Error: Please fix your theme to make plugins work correctly. Go to the Theme Editor and insert the following string as the first line of your theme’s footer.php file: <?php wp_footer(); ?> Go to your theme editor: click here.

Will it be safe to do this?
Will I spoil anything?

Thank you!

Hi Michail,

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 plugin should work properly, and you can ignore that error notice from your plugin.

Hope this shed some lights,
Cheers!

Thank you!

We are delighted to assist you with this.

Cheers!

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