Pretty new to WordPress functions, so apologies if this is basic stuff.
I've designed a parent theme that registers and enqueues two scripts like so:
if ( !function_exists( 'scherzo_scripts' ) ) :
function scherzo_scripts() {
if (!is_admin()) {
wp_register_script( 'html5shiv', get_template_directory_uri() . '/js/html5.js');
wp_register_script( 'css3mediaqueries', get_template_directory_uri() . '/js/css3-mediaqueries.js');
wp_enqueue_script('html5shiv');
wp_enqueue_script('css3mediaqueries');
}
}
add_action('init', 'scherzo_scripts');
endif;
I'm finding that if I install a child theme the scripts don't run. To try and force them to run I create a new functions.php file in the child theme folder and add:
function scherzo_scripts() {
if (!is_admin()) {
wp_register_script( 'html5shiv', get_template_directory_uri() . '/js/html5.js');
wp_register_script( 'css3mediaqueries', get_template_directory_uri() . '/js/css3-mediaqueries.js');
wp_enqueue_script('html5shiv');
wp_enqueue_script('css3mediaqueries');
}
}
add_action('init', 'scherzo_scripts');
But no joy. Am I doing something wrong?

wp_head();? – John P Bloch Apr 19 '11 at 13:04