Most efficient way to add javascript file to specific post and/or pages?
I am wondering what the most efficient method is to add a javascript file specifically for a post and/or page.
I am wondering what the most efficient method is to add a javascript file specifically for a post and/or page.
Before the new version of WordPress 3.0 came out I was using this jQuery code below to add custom buttons for my own shortcodes to the editor toolbar in the admin panel, it worked great. However with version 3 out now, it has stopped working, if I view source in admin panel I can see my code below is being loaded properly, it just doesn’t work anymore, does anyone know what has changed or how to fix to work with the newer version?
I am managing this blog.
As you can see, it loads both jquery.js?ver=1.12.4 and jquery-migrate.min.js?ver=1.4.1
I want to display a shortcode through jquery after the DOM is loaded:
Alright, I have almost finished up a clients project in WordPress, but I have hit a wall. I am not really great with jQuery (and I have yet to find a plugin to achieve what they are looking for). The client wants an automatic slider on the homepage that pulls in featured posts out of their five categories. I have scoured the net for plugins to achieve the “look” they want, but to no avail.
I have a fresh WP install and for purposes of keeping things simple I currently just have a simple action as follows in my functions.php:
I’ve been working on building a theme for the past couple days now, and I’ve run into a wall. While I originally included foundation.js as an enqueued script, I couldn’t remember why I had added it. Today, when I tried removing it (to improve page-load speed) from my functions.php file, it messed up all of my jQuery plugins.