Proper use of wp_enqeue_style

Two problems:

  1. You only need to provide the script path once, either in the wp_register_style() call, or in the wp_enqueue_style() call, but not both. (In fact, in this context, it would be fine to omit the wp_register_style() call entirely, and just use the wp_enqueue_style() call.)
  2. You’re hooking into the wrong action. Try hooking into wp_enqueue_scripots instead of into get_header. (Note: this will require the Theme to include a call to <?php wp_head(); ?> in the document head – but it should be doing so, anyway.)

Other considerations:

  • For custom styles/scripts, I would recommend prefixing the style slug; e.g. change main to srskitson-main.

tech