I tried that but it doesn’t work, I must be making a mistake somewhere…
add_filter( ‘restricted_site_access_is_restricted’, function( $is_restricted, $wp ) {
$actual_link = (isset($_SERVER[‘HTTPS’]) && $_SERVER[‘HTTPS’] === ‘on’ ? “https” : “http”) . “://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”;
if( $actual_link == site_url().’/’ ) {
return false;
} elseif ( $actual_link == site_url().’/sidentifier/’ ){
return false;
} elseif ( $actual_link == site_url().’/mon-compte/mot-passe-perdu/’ ){
return false;
} elseif ( wp_doing_ajax() ){
return false;
}
return $is_restricted;
}, 10, 2 );
add_filter( ‘restricted_site_access_is_restricted’, ‘my_restricted_check’ );
function my_restricted_check( $is_restricted ) {
global $wp;
if (
$wp->query_vars[site_url().’/mon-compte/mot-passe-perdu/’] == ‘recover’
)
$is_restricted = false;
return $is_restricted;
}
Here is the link sent by wordpress :
https://eurobijoux.fr/mon-compte/mot-passe-perdu/?key=4JA8f9Q23p6QHjOsxa7R&id=4916