wp_enqueue_script breaks theme

Discussion in 'Ichiban' started by Myron, May 4, 2018.

  1. Myron

    Myron New Member

    Joined:
    Mar 12, 2018
    Messages:
    2
    Likes Received:
    0
    I enqueued my custom javascript like this in my child theme's functions.php:

    function theme_enqueue_styles_and_scripts() {
    ...
    wp_enqueue_script( 'script', get_theme_file_uri() . '/assets/js/ichiban-child.js', array( 'jquery' ));
    }
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles_and_scripts' );
    But this breaks the theme (note: theme Customize displays correctly).
     
  2. Myron

    Myron New Member

    Joined:
    Mar 12, 2018
    Messages:
    2
    Likes Received:
    0
    Never mind. I used the wrong enqueue for customize. Working now.
     

Share This Page