• I’d like the age gate to load unless someone checks the “remember me” box and clicks “yes”. I have the remember me box unchecked by default, but right now, if I click yes, then reload the page, the age gate doesn’t display.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Phil

    (@philsbury)

    Hi @mindflint,

    Sorry for the slow reply.

    The functionality you describe is by design so as not to constantly check a user while they navigate the site.

    It also wasn’t possible to do what you wanted. The release of 2.3.4 (just gone up) will allow it under certain conditions.

    First, you must use the JavaScript version (from your link you seem to be already, so all good there)
    Second, you’ll need to add a filter to your functions.php:

    
    add_filter('age_gate_set_cookie', function($set_cookie, $remember) {   
        if (!$remember) {
            $set_cookie = false;
        }  
        return $set_cookie;
    }, 10, 2);
    

    And that’s it. It’ll not only hide the check if the check remember.

    Thanks
    Phil

Viewing 1 replies (of 1 total)
  • The topic ‘Remember Me checkbox functionality’ is closed to new replies.