Hi @xavatar94,
Your English is totally okay :).
To solve your problem, you can edit and add the following snippet to your theme’s functions.php file or a custom plugin.
Assume that you enabled pretty permalink and the registration page URL is example.com/register.
add_filter( 'restricted_site_access_is_restricted', function( $is_restricted, $wp ) {
if( 'register' === $wp->request ) {
return false;
}
return $is_restricted;
}, 10, 2 );
I added this code so that access was enabled access to password reset and forgot username as well.
edit: just realized I should have qualified the profile links I added access to are for the WP-Members Membership Plugin. I have been bouncing back and forward between them testing are realized I was confusing functionality between the two. 🙂
add_filter( 'restricted_site_access_is_restricted', 'zgwd_login_override', 10, 2 );
function zgwd_login_override( $is_restricted, $wp ) {
// check if page allowed
if ( 'registration' === $wp->request ||
'profile?a=pwdreset' === add_query_arg(array($_GET), $wp->request) ||
'profile?a=getusername' === add_query_arg(array($_GET), $wp->request) ) {
return false;
}
return $is_restricted;
}
-
This reply was modified 6 years, 3 months ago by
ZeroGravity.
-
This reply was modified 6 years, 3 months ago by
ZeroGravity.