In my themes functions.php file I have put:
add_action('wp_footer', 'method');
function method()
{
echo "this is being called";
die();
}
My wordpress footer.php file looks like this:
<?php wp_footer(); ?>
</body>
</html>
What could be the reason my add_action hook is not being called?
I can provide additional code or information if needed.
EDIT:
Instead of die()
if I echo a script it won't appear in the pages footer
add_action('wp_footer', 'method');
function method()
{
echo "<script>...</script>";
}
die()
? perhaps that is your problem.