Here is the function to add jQuery to the front end of the site. You just need to enqueue the script labeled jquery. if (!is_admin()) add_action(“wp_enqueue_scripts”, “default_jquery_enqueue”, 11); function default_jquery_enqueue() {...
So there are often times you would like to have settings in the WordPress dashboard but use the data in a js file. I found that this can easily be done using a jQuery.post call to a WordPress Ajax url. /* Javascript file */ var site_url = ”; jQuery( document...
So I came across this snippet of code recently when I was trying to find a way to give a user access to a form's entries based on a user role. I did find that I needed to modify it a little bit for the menu side of things so that when you go to the view entries page...
So if you have jQuery and the gtag method for Google Analytics running on your site you can add the following code to the head tag of your site. jQuery( document ).ready( function() { jQuery(“a[href^='tel']”).on(“click”,function(){ gtag(...