Using WordPress 4.2.2. Im trying to add some custom fields to the registration page. I have gotten the fields to show up there now, but for some reason i cannot get the stylesheet to load there too. The stylesheet loads fine on all other pages it seems but not the register page.

Im using this to load the scripts

add_action('wp_enqueue_scripts', array(&$this, "enqueueScripsAndStyles"));
public function enqueueScripsAndStyles() {
    wp_enqueue_style('sh_billing_styling', plugins_url('/css/sh_billing.css', __FILE__));
    wp_enqueue_style('sh_billing_fontawesome', plugins_url('/css/font-awesome.min.css', __FILE__));
    wp_enqueue_script('sh_billing_radiobuttons', plugins_url('/js/custom-form-elements.js', __FILE__));

Am i missing something? Thanks!


You need login_enqueue_scripts for the login page.

See: https://codex.wordpress.org/Plugin_API/Action_Reference/login_enqueue_scripts

Swap that out in your add_action, or add a new one, and it should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.