wp_register_style() not working for me
-
I’m building a new plugin and I need to register a css file.
Looking at Lester ‘GaMerZ’ Chan’s work, he is using the function called wp_register_style().add_action('wp_head', 'email_js'); function email_js() { wp_register_style('wp-email', plugins_url('wp-email/email-css.css'), false, '2.40', 'all'); }
This works great for his plugin, but why doesn’t it work for me?
Is it because it’s not a wp function?Here is my code:
add_action('init', 'sl_add_scripts'); function sl_add_scripts() { wp_register_style('sl_forms', plugins_url('wp-store-locator/style/sl_forms.css'), false, '1.00', 'all'); }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘wp_register_style() not working for me’ is closed to new replies.