1611 shaares
17 private links
17 private links
2 results
tagged
plugin
Alternatively, if you are creating the theme yourself and/or can modify it, you can create an action yourself using WordPress' do_action
function. This is also how they create their other hooks. So basically in your theme, you would go where you want to, right after the <body>
tag, and do something like:
do_action('after_body');
You can also pass arguments to the action callback, see the linked documentation for information.
Then afterwards, you would simply use the add_action
function to hook onto it.
add_action('after_body', 'my_callback');
Hope that helps. Sorry if I misunderstood.
A standardized, organized, object-oriented foundation
for building high-quality WordPress Plugins.