I'm trying to load scripts specific to a page using the following:
function pagePopUps () {
if ( is_page(253)) {
wp_register_script('popUpVideo1', "http://xxxxxxx/scripts/popUpText1.js", array('jquery', 'jqueryUI'));
wp_enqueue_script('popUpVideo1');
}
}
add_action('init', 'pagePopUps');
This does not work.
Any suggestions on the source of the problem?
Additional data:
Static Page
Child Theme
Code is located in the functions file of the child theme.
Thanks.