admin管理员组

文章数量:1122846

How can I style the reset password page, where I put in my new password?

I tried going like this:

function my_login_stylesheet() {
    wp_enqueue_style( 
        'custom-login', 
        get_template_directory_uri() . '/dist/styles/main.css' 
    );
}
add_action( 'login_enqueue_scripts', 'my_login_stylesheet' );

but it added the CSS only to the login and forgot password page (forgot password as in the page where you put in your email).

However, I want to style the reset password page (where you put in your passwords).

How can I style the reset password page, where I put in my new password?

I tried going like this:

function my_login_stylesheet() {
    wp_enqueue_style( 
        'custom-login', 
        get_template_directory_uri() . '/dist/styles/main.css' 
    );
}
add_action( 'login_enqueue_scripts', 'my_login_stylesheet' );

but it added the CSS only to the login and forgot password page (forgot password as in the page where you put in your email).

However, I want to style the reset password page (where you put in your passwords).

Share Improve this question edited Nov 1, 2015 at 11:58 Gabriel 2,24810 gold badges22 silver badges24 bronze badges asked Nov 1, 2015 at 10:57 Aryeh ArmonAryeh Armon 1012 bronze badges 4
  • That's strange, it is the same page, calling same hooks essentially. Had you verified that your file isn't loading at all? It might be just that your CSS rules are off. – Rarst Commented Nov 1, 2015 at 14:53
  • @Rarst yes i'm sure. try it out yourself. – Aryeh Armon Commented Nov 1, 2015 at 16:45
  • @AryehArmon - Did you ever find a solution for this? I'm having the same issue. – Yazmin Commented Feb 6, 2016 at 20:45
  • @AryehArmon Please refer this wordpress.stackexchange.com/questions/216932/… – Pratik Patel Commented May 27, 2024 at 12:48
Add a comment  | 

1 Answer 1

Reset to default 0

Woocommerce overrides default account management templates with its own shortcode driven templating system. Use this hook instead:

add_action('woocommerce_lostpassword_form', 'do_whatever');

本文标签: wp enqueue styleCustomize the reset password page