javascript – Hook a script as the very last one before the closing body tag


I’m trying to add a script in the very last position before the closing via function.php

Other scripts are hooked by other plugins, so WP is placing my script as the firts one of the list. Like:

[my script]
[the script generating the element I’d like to target]

Is there a way to tell WordPress to hook my script as the last one before the closing tag, no matter what the other scripts are doing?

Thank you

user3879604 3 months 2022-07-16T12:28:46-05:00 0 Answers 0 views 0

Leave an answer