Link to home
Start Free TrialLog in
Avatar of MarkJulie
MarkJulieFlag for United States of America

asked on

WordPress header.php and footer.php errors

Your theme needs to be fixed for plugins to work (Especially Floating Social Media Icon). To fix your theme, use the Theme Editor to insert <?php wp_head(); ?> just before the </head> line of your theme's header.php file.

Your theme needs to be fixed for plugins to work (Especially Floating Social Media Icon). To fix your theme, use the Theme Editor to insert <?php wp_footer(); ?> just before the </body> line of your theme's footer.php file.


I get the two above warnings at the top of a page in Skematik theme with WP 3.5.1. The theme only  has one line of do_action code in the header.php and footer.php files in theme editor. There is also a skematik-header-functions.php and similar footer file. I modified them with the php code but still get the same issue.

What else should I try?

Mark
Avatar of Ishaan Rawat
Ishaan Rawat
Flag of India image

Do as the code says..

Add <?php wp_head(); ?> in the header.php just before closing the head tag..
and
add <?php wp_footer(); ?> in the footer.php just before closing the body tag....

Don't know why to put them...
See the official documentation...

http://codex.wordpress.org/Function_Reference/wp_head
http://codex.wordpress.org/Function_Reference/wp_footer
Avatar of MarkJulie

ASKER

User generated image
Please be so kind as to explain which line of code represents the closing head tag in this screenshot. My suspicion is that there may be another file to edit. I am new to WP. The code in the footer.php is similar, but I will provide a screenshot if it is helpful.

Thanks
try doing it by JQUERY too...

Just add this to your index.php in the starting or the end......

<script>
$(document).ready(function() {
    $("head").append("<?php wp_head(); ?>");
    $("body").append("<?php wp_footer(); ?>");
});
</script>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Heather Ritchey
Heather Ritchey
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The final answer from Dzynit pointed me in the correct direction since the standard file called another that was slightly less obvious.