Two problems:
- You only need to provide the script path once, either in the
wp_register_style()
call, or in thewp_enqueue_style()
call, but not both. (In fact, in this context, it would be fine to omit thewp_register_style()
call entirely, and just use thewp_enqueue_style()
call.) - You’re hooking into the wrong action. Try hooking into
wp_enqueue_scripots
instead of intoget_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
tosrskitson-main
.