WordPress.org

Ready to get started?Download WordPress

Forums

Which "add_action(..)" parameters for Top of Page (3 posts)

  1. Lucanos
    Member
    Posted 8 years ago #

    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?

  2. niziol
    Member
    Posted 8 years ago #

    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.

  3. Lucanos
    Member
    Posted 8 years ago #

    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...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags