• Resolved knoppys

    (@knoppys)


    Hi All

    Im trying to use this function for the first time and its some of its working and some of its not.

    function enqueue_scripts() {
        	// Enqueue jquery
        	wp_enqueue_script('jquery');
        	//register jquery and the site scripts
        	wp_register_script('ajax-load-more', get_template_directory_uri() . '/ajax-load-more/js/ajax-load-more.js', false, false, false );
        	wp_register_script( 'bxslider', get_template_directory_uri() . '/js/jquery.bxslider.min.js', false, false, false );
        	wp_register_script( 'core', get_template_directory_uri() . '/js/core.js', false, false, false );
        	wp_register_script( 'colour-scheme', get_template_directory_uri() . '/js/colour-scheme.js', false, false, false );
        	wp_register_script( 'add-this-event', 'https://js.addthisevent.com/atemay.js', false, false, false );
        	wp_register_style( 'site-stylesheet', get_stylesheet_uri(), false, false );
        	wp_register_style( 'toast-stylesheet', get_template_directory_uri() . '/toast.css', false, false );
        	wp_register_style( 'bxslider-stylesheet', get_template_directory_uri() . '/css/jquery.bxslider.css', false, false );
        	//enqueue scripts
        	wp_enqueue_script( 'ajax-load-more' );
        	wp_enqueue_script( 'bxslider' );
        	wp_enqueue_script( 'core' );
        	wp_enqueue_script( 'colour-scheme' );
        	wp_enqueue_script( 'add-this-event' );
        	wp_enqueue_style( 'site-stylesheet' );
        	wp_enqueue_style( 'toast-stylesheet' );
        	}
    
    	// Hook into the 'wp_enqueue_scripts' action
    	add_action( 'wp_enqueue_scripts', 'enqueue_scripts' );

    The following is working:
    site-stylesheet
    toast-stylesheet
    add-this-event

    The rest of the files arent loading at all. Or they are loading but they arent working. I started with all these loaded in the <head> but figured Id do things properly.

    Any ideas

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Enqueue Scripts and Styles’ is closed to new replies.