WordPress.org

Ready to get started?Download WordPress

Forums

plugin hook for top of body element? (3 posts)

  1. swiftset
    Member
    Posted 9 years ago #

    Hello, I was working on a plugin (http://www.tangentspace.net/cz/archives/2005/05/jsmath-and-wp), and needed to write to the body element before any posts were displayed. I looked at the WP Wiki, but didn't find an appropriate hook. Eventually I ended up adding one (wp_bodytop) to the function get_header() in template-functions-general.php. Am I missing some other way of doing this?

    Thanks
    Alex

  2. ColdForged
    Member
    Posted 9 years ago #

    None that I can see. Perhaps make a mosquito request for it as it seems a sensible and useful hook to include.

  3. Joshua Sigar
    Member
    Posted 9 years ago #

    are you loading a javascript function? Can you not print the following in head section?

    <script type="text/javascript">
    function foo() {}
    window.onload = foo;
    </script>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags