I can not load a js file from a child theme -Wordpress

0

I created a child theme to modify a mobile menu. It has a js script, however when loading, look for this file in the parent theme and not in the child theme.

I used this function to load the child theme:

function menumobile_setup(){
    wp_register_script( 'slidepanel', get_template_directory_uri() . '/js/slidepanel.js', array('jquery'), '1.0', true );
    wp_enqueue_script('slidepanel');
}
add_action('after_setup_theme', 'menumobile_setup');

    
asked by anonymous 31.08.2018 / 21:25

0 answers