WordPress not showing jQuery

Question

I am trying to link a new JavaScript file where I want to add some custom jQuery to the content. But it is not showing on my website or pages.

Here is the code in functions.php and my JavaScript file

function my_child_script(){
    wp_enqueue_script(
        'custom-child',
        get_stylesheet_directory_uri() . '/js/child-custom.js',
        array( 'jquery' ),
        '1.0.0',
        true
    );
}
add_action( 'wp_enqueue_script', 'my_child_script' );

and this is what am trying to do in my custom js file

jQuery(document).ready(function() {
    jQuery(".block-title-wrap").hide();
});
0
Vijay Patil 3 months 2020-12-30T11:10:23-05:00 0 Answers 4 views 0

Leave an answer

Browse
Browse