0
votes
3answers
67 views

How do I enqueue a JavaScript in my footer via the functions.php file?

Okay, so I'm well familiar with the way to properly enqueue a stylesheet or JavaScript in the WordPress header via the functions.php file. Recently though I came across a situation that has me ...
2
votes
1answer
297 views

Add script to footer - on post editor

How do you add a script on the footer of the post editor ? I'm adding a meta box under the post editor and I need to include a javascript before the closing body tag (on the footer) How do I achieve ...
0
votes
2answers
131 views

JavaScript enque stopped working

Somewhere along the line I have messed up my js enqueue I am not sure how. I have the following in my functions.php file and I am including <?php wp_footer(); ?> in my footer.php before the js ...
4
votes
1answer
2k views

wp_enqueue script my_javascript_file in the footer

I am trying to place my_javascript_file in the footer. According to the documentation $in_footer is the fifth value and it is a boolean so I have it set to true. Currently it doesn't show up anywhere, ...
1
vote
2answers
276 views

Hook for writing text string after footer scripts

I'm looking to insert a string of JavaScript variables AFTER the in_footer enqueued scripts. When I write the string via the wp_footer hook, they occur before the in_footer scripts. Is there another ...
2
votes
2answers
162 views

Inserting JS snippet in the footer if there is no wp_footer?

I wrote a plugin which uses wp_enqueue_script() which will include the snippet in either the header or footer depending on the parameters you pass it. The in_footer parameter works great - if the ...