Add Mootools to a WordPress child theme

The following code, when included in the functions.php file in your WordPress child theme, will correctly load Mootools and a custom script. This is the only way I am able make custom scripts work, but you hear a lot of stuff out there on the interweb… <?php function add_js() { $stylesheet_dir = get_bloginfo(‘stylesheet_directory’); $myscript = […]

FTOB: Using jQuery with WordPress

Originally posted on 10/10/08 at I struggled with this, as the usual method of including a javascript library and an external javascript script did not work. Usually, I would do this: <script style=”text/javascript” src=<?php bloginfo(‘url’); ?>/wp-includes/js/jquery/jquery.js” ></style> <script style=”text/javascript” src=<?php bloginfo(‘template_directory’); ?>/myScript.js” ></style> But that didn’t work at all, even when I included the […]

FTOB: JavaScript: The Definitive Guide

Originally posted on 3/29/08 at I always feel a mixture of excitement and dread when I start a new technical book. I’m about to dive into the intimidatingly thick JavaScript: The Definitive Guide by David Flanagan. Javascript guru Douglas Crockford mentioned in his wonderful series of lectures that it was the best (or did […]