So I added BigFoot.js to Mean Green Nation. I run MGN on WordPress but the only way I saw to add it to my site was through the plugin. I’m not the biggest fan of WP shortcodes, and I like the way Markdown does footers and so I wanted to stick with that.
After some quick googlin’ I didn’t find an obvious how-to. I fiddled around with it for a half-hour and got it working. To fill the void until someone better comes along here you go:
Host it in your themes folder. Ex: YourKewlTheme/js/bigfoot/
Edit your theme’s functions like in the example below.
Enjoy!
<code><?php/**
* Proper way to enqueue scripts and styles
*/functionyour_theme_add_bigfootscripts_yo(){wp_enqueue_script('bigfoot.js',get_stylesheet_directory_uri().'/js/bigfoot/bigfoot.js',array('jquery'),false,false);wp_enqueue_style('bigfoot-default.css',get_stylesheet_directory_uri().'/js/bigfoot/bigfoot-default.css');}add_action('wp_enqueue_scripts','your_theme_add_bigfootscripts_yo');functionyourtheme_add_head(){?><!-- Your HTML goes here --><script type="text/javascript">jQuery.bigfoot();</script><?php}add_action('wp_head','yourtheme_add_head');?>