• I am developing a theme from scratch and having error in my enqueue_script when i use moxilla console to preview it. Here below is my wp_enqueue and below my error message

    <body class="home blog logged-in admi…hfeed customize-support">
    search.js:6:13
    GEThttps://localhost/sovadigitals.com/wp-content/themes/sova-digitals/js/bootstrap.js?ver=5.9.2
    [HTTP/1.1 404 Not Found 417ms]
    
    GEThttps://localhost/sovadigitals.com/wp-content/themes/sova-digitals/assets/js/bootstrap.js?ver=5.9.2
    [HTTP/1.1 404 Not Found 499ms]
    
    Loading failed for the <script> with source “https://localhost/sovadigitals.com/wp-content/themes/sova-digitals/js/bootstrap.js?ver=5.9.2”. localhost:48:1
    JQMIGRATE: Migrate is installed, version 3.3.2 jquery-migrate.min.js:2:709
    Loading failed for the <script> with source “https://localhost/sovadigitals.com/wp-content/themes/sova-digitals/assets/js/bootstrap.js?ver=5.9.2”.
    wp_enqueue_script( 'sova-digitals-bootstrap-bundle-js', esc_url(get_template_directory_uri()) . '/assets/js/bootstrap.js', array( 'jquery' ), '', true );
    	wp_enqueue_script( 'sova-digitals-navigation-js', esc_url(get_template_directory_uri()) . '/assets/js/navigation.js', array( 'jquery' ), '', true );
    
    • This topic was modified 2 years, 2 months ago by Jan Dembowski.
Viewing 3 replies - 1 through 3 (of 3 total)
  • These are 404 errors, i.e. the referenced file does not exist. Check the path exactly. Also pay attention to upper/lower case.

    Thread Starter shaibustephen

    (@shaibustephen)

    what do you mean by upper/lower case? Help me as i am new in wordpress development

    This has nothing to do with WordPress but with the server’s file system. For many there is a difference between “Bootstrap.js” and “bootstrap.js”. You have to take this into account when writing the directory and file names in your own code.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do i resolve sscript not loading in wordpress?’ is closed to new replies.