WordPress enqueuing stylesheet as script

I have a weird situation going on. I’m currently working on localhost. WordPress seems to be enqueuing my stylesheet as a script. Below is a screenshot and and a snippet of the enqueue code. The stylesheet is also throwing errors in the console, as if being interpreted as a script.

Screenshot

if ( is_page_template( 'page-templates/fullpage-scroll-template.php' ) ) {
    wp_register_script( 'fullpage-css', trailingslashit( get_template_directory_uri() ) . 'css/fullpage.css' );
    wp_enqueue_script( 'fullpage-css' );
  }

Related posts

1 comment

  1. as prometheus pointed out there, it should be wp_enqueue_style NOT wp_enqueue_script

    if ( is_page_template( 'page-templates/fullpage-scroll-template.php' ) ) {
    wp_register_style( 'fullpage-css', trailingslashit( get_template_directory_uri() ) . 'css/fullpage.css' );
    wp_enqueue_style( 'fullpage-css' );
     }
    

Comments are closed.