WordPress.org

Ready to get started?Download WordPress

Forums

How to add script code to body tag (8 posts)

  1. on_edge
    Member
    Posted 5 years ago #

    How can I add script code to the body tag - sitewide - and not have it overwritten during upgrades?

  2. jabalsad
    Member
    Posted 5 years ago #

    +1, I'd also like to know :D

  3. Shane G
    Member
    Posted 5 years ago #

    Hi,

    Please have a check with this formula:

    <sourcecode>
    </sourcecode>

    [spam link moderated]

  4. jabalsad
    Member
    Posted 5 years ago #

    Oh, I think my question is slightly different. I'm trying to add a custom 'onLoad=""' attribute to the <body> tag itself. I'm guessing you can do this with a filter perhaps, though I haven't looked into it.

  5. budhajeewa
    Member
    Posted 4 years ago #

    @on_edge & @jabalsad:

    Have you people found a solution? I am looking for the same thing.

  6. Zoetta
    Member
    Posted 4 years ago #

    It seems that nobody can find the body tag. Did anyone of you add Google Analytics to a blog?
    How does it works!

  7. ktdenterprises
    Member
    Posted 4 years ago #

    The best way to add google analytics is to use the plugin - google analyticator

    It will do if for you automatically

  8. webmasterguru
    Member
    Posted 4 years ago #

    emmmm.....you are trying to put this above the body closing tag. check your footer.php in wp-contents -> themes -> default or classic (whichever one you are using). There's no need for the plugin.

Topic Closed

This topic has been closed to new replies.

About this Topic