Support » Plugin: Restricted Site Access » Allow access to lost password page using TML

  • Resolved rezon8dev


    Can you help with the code for my functions.php which will allow a visitor to access the /lost-password page when using the redirect to a specific page option for a registered user protected site? I’m using theme my login and have placed a gravity form for site registration on the TML login page but would ideally like the above code to allow me to add additional pages to the code when I want to allow them to be accessed by a user in addition to my login/register page.


Viewing 1 replies (of 1 total)
  • Plugin Author Jake Goldman


    10up Engineer

    The ‘restricted_site_access_is_restricted’ let’s you override restriction.

    In this case:

    add_filter( 'restricted_site_access_is_restricted', 'my_restricted_check', 10, 2 );
    function my_restricted_check( $is_restricted, $wp ) {
    	if ( false === $is_restricted )
    		return false;
    	if ( ! empty( $wp->query_vars['pagename'] ) && $wp->query_vars['pagename'] == 'lost-password' )
    		return false;
    	return true;
Viewing 1 replies (of 1 total)
  • The topic ‘Allow access to lost password page using TML’ is closed to new replies.