Support » Plugin: Theme My Login » Make Theme My Login Compatible with “Remember Me” Plugin?

  • Resolved liatmgat

    (@liatmgat)


    Hi there,

    I would like to use the “Remember Me” plugin to keep my users logged-in for longer. When I activate it and refresh the page, the checkbox for “Remember Me” is not checked. I think this may have to do with incompatibility with Theme My Login, or maybe Theme My Login simply doesn’t show that the checkbox is checked?

    Would you be willing to explore a “Remember Me” compatibility?
    Here is the plugin I’m talking about: https://wordpress.org/plugins/jonradio-remember-me/

    Thanks,
    Liat (a paying user).

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    
    function check_rememberme_by_default() {
        if ( $rememberme = tml_get_form_field( 'login', 'remember_me' ) ) {
            $rememberme->add_attribute( 'checked', 'checked' );
        }
    }
    add_action( 'init', 'check_rememberme_by_default' );
    

    Thank you so much for your answer!

    I added the code you provided to the functions.php of my child theme, and checked the login screen in a new private window.

    Unfortunately, the checkbox is still not checked.

    See screenshots here: https://imgur.com/a/7Ed7nVy

    I am using the latest version of Astra Pro with a child theme.
    Am I doing something wrong? Thanks!

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Whoops. I had the field name incorrect. Try this:

    
    function check_rememberme_by_default() {
        if ( $rememberme = tml_get_form_field( 'login', 'rememberme' ) ) {
            $rememberme->add_attribute( 'checked', 'checked' );
        }
    }
    add_action( 'init', 'check_rememberme_by_default' );
    

    It worked! Thank you so so much. This is great!
    I really appreciate it.

    -Liat

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.