Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, we use plugins so we won’t change theme core files because this files get overwritten when you update the theme. So first step would be to create a child theme.
    Copy the footer.php file the theme to the child theme and add your javascript there. To locate the post you can use the posr div id(depending on your theme it might have one or you’ll have to add it.).What theme are you using? can you share a link to your site?
    Regards

    Thread Starter bloggertipsandtools

    (@bloggertipsandtools)

    Thanks for the reply 🙂 this is the my blog. http://bloggertipsandtools.com/. I am beginner for wordpress. But I have some knowledge about HTML,CSS,PHP and etc. If you don’t mind please tell me what file I shroud change to add JavaScript to under every post. again thanks.

    Hi,just add your Javascript code into end of the single.php file.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to put JavaScript to under every post’ is closed to new replies.