0

I created a new theme, starting by zero. The theme works correctly, but some plugins not.

I installed Google Analytics & Webmaster Tools, I compiled the plugin with my track codes, but in the html code them did non appear.

  • 2
    does your theme call wp_head and wp_footer in the template? – Milo Mar 24 '16 at 17:58
  • Yes (its a WP Multisite) – WalterV Mar 24 '16 at 18:05
  • @Milo, I did misunderstood. You are right. – WalterV Mar 24 '16 at 23:49
2

By the sounds of it, your custom theme is missing the common hooks that allow plugins to alter/output their code.

To take a simple example, every theme should have a call to wp_head() somewhere in the section of the output page. This allows a plugin to "hook" into your , and for example, output code to load its Javascript.

Here's a real-life example. The WordPress Twentyfifteen theme has this in its header.php file (traditionally the part of a theme that outputs the section of any page):

... other <head> stuff
    wp_head();
    wp_footer();

?>  
</head>
  • You should mention wp_footer() – Tom J Nowell Apr 7 '16 at 21:58
  • wp_footer goes in the footer, not the head, it should be the last thing before the closing body tag – Tom J Nowell Apr 8 '16 at 1:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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