It is necessary to close access to some pages and buttons of the site, the site is made on the WordPress engine. Access will be open only to those users who enter some code that they will receive.
How to close a page or button when the session is not running, and open for 24 hours after the user has entered the code?