• I’m trying to develop a WordPress Plugin, and I want it to be executed first thing after the opening <BODY> tag.
    I have found the hooks “wp_footer” and “wp_head”, but these seem to only be to have the plugin executed in the Footer and <HEAD> sections respectively.

    I am wanting to have the plugin-generated code inserted as follows.
    CURRENT:
    <BODY>
    [CONTENT]
    WANTED:
    <BODY>
    [PLUGIN OUTPUT]
    [CONTENT]

    I would rather not have to make the user insert any tags into the template in order for this plugin to be executed, if possible.

    Any ideas, suggestions, etc?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I can’t think of a hook that would execute right after the body tag, but the WordPress Hooks directory lists a ton of available hooks. Maybe give that a read-over and see if any of those would work for you. I suspect there is not one that would go right after the body tag, as that is in “template country”, hence why the wp_head hook is dependent on having the wp_head() template tag within the template to work.

    Maybe if you explain what your plug-in will be doing, someone may have a suggestion as to a work-around or another hook that may be suitable.

    Good luck,
    Michael.

    Thread Starter Luke Stevenson

    (@lucanos)

    It’s a plugin I am developing to implement the Explorer Destroyer coding into WordPress deployments.
    Not a need to have, more a project I picked up to try and expand my knowledge of WP Plugins and coding…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Which “add_action(..)” parameters for Top of Page’ is closed to new replies.