WordPress.org

Forums

[resolved] hook to customise the lost password screen (4 posts)

  1. rec19
    Member
    Posted 1 year ago #

    Hello,

    I'm no coder, just do some css.

    I've already got:

    add_action('admin_head', 'custom_admin');
    function custom_admin() {
       echo '<style type="text/css">
    css code here
    	</style>';
    }
    
    add_action('login_form', 'custom_login');
    function custom_login() {
       echo '<style type="text/css">
    css code here
    	</style>';
    }

    I've tried:

    add_action('password_reset', 'custom_password_reset');
    function custom_password_reset() {
       echo '<style type="text/css">
    css code here
    	</style>';
    }

    But it doesn't work.

  2. rec19
    Member
    Posted 1 year ago #

    I just worked it out I had to change login_form to login_head, and it does both login and lost password pages. I have also been trying to work out the hook for the registration page, I have registrations enabled, I have tried the following hooks; user_register and register_form bt nothing happens. Does anyone know how to add css to the registration page on mysite.com/wp-signup.php

    Thanks in advance

  3. bcworkz
    Member
    Posted 1 year ago #

    Use wp_enqueue_style(). This function must be called from specific action hooks. These are the same hooks one uses for wp_enqueue_script().

  4. rec19
    Member
    Posted 1 year ago #

    thanks, much appreciated

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.