Looking through some of the top Google results, this question has been answered a number of times, but the answers given don’t seem to be working in my WP 3.6 install.
One solution given is this:
function my_thickbox() {
if (!is_admin()) {
wp_enqueue_script('thickbox', null, array('jquery'), true);
wp_enqueue_style('thickbox.css', includes_url('/js/thickbox/thickbox.css'), null, '1.0');
}
}
add_action('init', 'my_thickbox');
Another was this: add_action( 'wp_enqueue_scripts', 'add_thickbox' )
.
I’ve also tried using this add_thickbox()
with no success.
All of these approaches seem to successfully load thickbox.css
, but no JS file is showing up. I can manually go and include the path to thickbox.js
, but that seems less desirable given that all of this seems to be handled by the core in script-loader.php
.
You need to add a call of
wp_footer();
function. Do it before closing body tag in yourfooter.php
file. It should look like this: