How to add code after head tag wordpress

5 replies
How do I add code to individual wordpress pages, below the head tag? I am trying to add Google optimizer code.

Thanks Glenn
#add #code #head #tag #wordpress
  • Profile picture of the author hocuspocus32
    i guess you can edit the theme to do that.
    Signature

    yolo


    {{ DiscussionBoard.errors[6303000].message }}
  • Profile picture of the author imgeek2727
    It's easiest to edit it through your wordpress theme but alternatively you could go into your source file in your root directory and change it there but that can be challenging for someone who doesn't know much about html.
    {{ DiscussionBoard.errors[6303358].message }}
  • Profile picture of the author Jason Johns
    Be careful editing your wordpress files as you can break your installation.

    Make sure you have a backup of it that you can restore and that works before you start.

    You can do this by editing one of the theme files (Appearance, Editor).

    However, this won't make it appear on each individual page, it will be one generic piece of code for every page based on that template file.

    An alternative would be to look at using something like the exec-php plugin and putting it in your post, but I don't know if that would work.

    They may be a plugin already written that would help you - if you have a search around you might find something.

    Cheers

    jason
    {{ DiscussionBoard.errors[6303456].message }}
  • Profile picture of the author Joseph Robinson
    Banned
    For future reference Glenn, posts about stuff like this belong in the Website Design forum.

    {{ DiscussionBoard.errors[6305318].message }}

Trending Topics