Title: JavaScript files are not registered
Last modified: October 9, 2020

---

# JavaScript files are not registered

 *  [liljeqvist](https://wordpress.org/support/users/liljeqvist/)
 * (@liljeqvist)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/javascript-files-are-not-registered/)
 * I am converting an HTML page to a WordPress theme for a customer, and everything
   was going fine until I got to the JavaScript part.
 * I can get the css files to work just fine by using
 *     ```
          wp_register_style('header', get_template_directory_uri() . '/css/header.css', array(), 1, 'all');
           wp_enqueue_style('header');
       ```
   
 * I have tried to add the JS files, but for some reason they are not registered
   when I test the page. What have I missed?
 *     ```
       function shapeSpace_include_custom_jquery() {
   
       	wp_deregister_script('jquery');
       	wp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js', array(), null, true);
   
       }
       add_action('wp_enqueue_scripts', 'shapeSpace_include_custom_jquery');
   
       function load_javascript() {
   
           wp_register_script('script2', get_template_directory_uri() . '/js/script2.js', array(), 1, 1, 1);
           wp_enqueue_script('script2');
           wp_register_script('script3', get_template_directory_uri() . '/js/script3.js', array(), 1, 1, 1);
           wp_enqueue_script('script3');
           wp_register_script('navigation', get_template_directory_uri() . '/js/navigation_script.js', array(), 1, 1, 1);
           wp_enqueue_script('navigation');
           wp_register_script('scroll', get_template_directory_uri() . '/js/scroll.js', array(), 1, 1, 1);
           wp_enqueue_script('scroll');
   
       }
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/javascript-files-are-not-registered/#post-13511605)
 * It looks like you’re not calling the load_javascript() function anywhere, only
   the shapeSpace_include_custom_jquery() function. You will need to call both if
   you want both to work.
 *  [Aims Infosoft](https://wordpress.org/support/users/aimsinfosofts/)
 * (@aimsinfosofts)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/javascript-files-are-not-registered/#post-13511699)
 * Hello,
 * Please add code.
    `add_action('wp_enqueue_scripts', 'load_javascript');`
 * Please check and let me know if any
 * Thank you

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘JavaScript files are not registered’ is closed to new replies.

## Tags

 * [converting](https://wordpress.org/support/topic-tag/converting/)
 * [html](https://wordpress.org/support/topic-tag/html/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 3 participants
 * Last reply from: [Aims Infosoft](https://wordpress.org/support/users/aimsinfosofts/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/javascript-files-are-not-registered/#post-13511699)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
