Support » Plugins and Hacks » Alternative wp_footer hook?
10 years, 7 months ago
I’m writing a plugin to display some statistics at the bottom of a page, yet when I use the wp_footer hook, the text is shown outside of the site template. Is there a similar hook or filter I could use that would keep the text in the template?
Output to a hook is displayed at the same place that hook is displayed. As long as your wp_footer is called in the template then that’s where your output will go.
Maybe your wp_footer is out of place or maybe your plugin is adding extra html/css that’s breaking your layout?
document.getElementById('footer').innerHTML = document.getElementById('footer').innerHTML.concat([my output]);
Probably not the best way to do it but it works on everything I’ve tested it on.