Comments Colleen started the conversationNovember 19, 2015 at 1:28pmHow do I enqueue a custom_script.js to the newest Child\'s theme function.php? Directory: \"\'/js/custom_script.js\'\". As you can see, I tried the below and it is not working. <?php add_action( \'wp_enqueue_scripts\', \'salient_child_enqueue_styles\',50);function salient_child_enqueue_styles() { wp_enqueue_style( \'parent-style\', get_template_directory_uri() . \'/style.css\' );}add_action( \'wp_enqueue_scripts\', \'themeslug_enqueue_script\',50 );function themeslug_enqueue_script() { wp_enqueue_script( \'custom_script\', get_template_directory_uri() . \'/js/custom_script.js\' );}?> 8,991Tahir repliedNovember 19, 2015 at 6:14pmHey, Please see this in regards: https://themenectar.ticksy.com/ticket/136919/ Cheers ThemeNectar Support Team Colleen repliedNovember 25, 2015 at 7:59pmclose ticket Sign in to reply ...
How do I enqueue a custom_script.js to the newest Child\'s theme function.php? Directory: \"\'/js/custom_script.js\'\". As you can see, I tried the below and it is not working.
<?php
add_action( \'wp_enqueue_scripts\', \'salient_child_enqueue_styles\',50);
function salient_child_enqueue_styles() {
wp_enqueue_style( \'parent-style\', get_template_directory_uri() . \'/style.css\' );
}
add_action( \'wp_enqueue_scripts\', \'themeslug_enqueue_script\',50 );
function themeslug_enqueue_script() {
wp_enqueue_script( \'custom_script\', get_template_directory_uri() . \'/js/custom_script.js\' );
}
?>
Hey,
Please see this in regards: https://themenectar.ticksy.com/ticket/136919/
Cheers
ThemeNectar Support Team
close ticket