Okay
  Public Ticket #589019
Enqueue Script in Child Theme Functions.php
Closed

Comments

  • Colleen started the conversation

    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\' );

    }

    ?>

  •  8,991
    Tahir replied

    Hey,

    Please see this in regards: https://themenectar.ticksy.com/ticket/136919/

    Cheers


    ThemeNectar Support Team 

  • Colleen replied

    close ticket