Title: Remember Me checkbox functionality
Last modified: August 19, 2019

---

# Remember Me checkbox functionality

 *  [mindflint](https://wordpress.org/support/users/mindflint/)
 * (@mindflint)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/remember-me-checkbox-functionality/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fremember-me-checkbox-functionality%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Phil](https://wordpress.org/support/users/philsbury/)
 * (@philsbury)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/remember-me-checkbox-functionality/#post-11872862)
 * Hi [@mindflint](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/age-gate/assets/icon-256x256.png?rev=2783003)
 * [Age Gate](https://wordpress.org/plugins/age-gate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/age-gate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/age-gate/)
 * [Active Topics](https://wordpress.org/support/plugin/age-gate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/age-gate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/age-gate/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Phil](https://wordpress.org/support/users/philsbury/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/remember-me-checkbox-functionality/#post-11872862)
 * Status: not resolved