Home › Forums › JavaScript › Insert jQuery into wordpress post › Reply To: Insert jQuery into wordpress post
May 21, 2014 at 12:45 am
#170774
mcgyver47
Participant
Thanks you for help.
Code as above works perfectly and as expected if placed after a document ready function in header.php.
If I save same code in a xxx.js file and then I enqueue the script the correct way, it doesn’t work…Should I modify the code one way or another to make it work when loaded from a specific file ?
As you advise I can then use conditional tags to load it only for pages or even posts I choose.
Any ideas ?