wordpress wp_enqueque not working

69 views Asked by At

i have a simple question. This is my function.php enqueque code:

/**
 *Enqueue styles.
 */

function circle_scripts() {
    //load css
    wp_enqueue_style( 'font-body', 'http://fonts.googleapis.com/css?family=Michroma' );

    wp_register_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '1.0', 'all' );
    wp_enqueue_style( 'bootstrap-style' );

    wp_register_style( 'animate', get_template_directory_uri() . '/css/animate.css', array(), '1.0', 'all' );
    wp_enqueue_style( 'animate' );

    wp_register_style( 'myCss', get_stylesheet_uri() );
    wp_enqueue_style( 'myCss' );

    //load js
    wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', get_template_directory_uri() . '/js/jquery-1.11.3.min.js', array(), '1.0.0', true );
    wp_enqueue_script( 'jquery' );

    wp_register_script( 'Bootstrap-plugin', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '1.0.0', true );
    wp_enqueue_script( 'Bootstrap-plugin' );

    wp_register_script( 'backTop', get_template_directory_uri() . '/js/jquery.backTop.min.js', array(), '1.0.0', true );
    wp_enqueue_script( 'backTop' );

    wp_register_script( 'WOW', get_template_directory_uri() . '/js/wow.min.js', array(), '1.0.0', true );
    wp_enqueue_script( 'WOW' );

    wp_register_script( 'myScript', get_template_directory_uri() . '/js/myjs.js', array(), '1.0.0', true );
    wp_enqueue_script( 'myScript' );
}

add_action( 'wp_enqueque_scripts', 'circle_scripts' );

but this code doesn't work, not load the css and js file. if i separate the enqueque_style and the enqueque_script and call in header.php and footer.php the 2 function i created in function.php it work.

1

There are 1 answers

0
rnevius On

You spelled the name of the hook wrong (enqueque should be enqueue). You should add the following action:

add_action( 'wp_enqueue_scripts', 'circle_scripts' );