GeoDirectory has no login or registration page of its own. Its Login and Register links use the standard WordPress URLs (the ones wp_login_url() and wp_registration_url() return), so any plugin that changes those URLs changes the GeoDirectory links as well. This applies to s2Member and most other membership plugins.
The GD Login page setting from GeoDirectory v1, and the snippets written for it, do not apply to current versions.
Let the plugin handle it
UsersWP, our free user plugin, already points the WordPress login and register URLs to its own pages, so GeoDirectory’s links follow it with no extra work. Many membership plugins have a similar option to replace the default WordPress login page. Turn that on first and check the links again.
Change the links with a snippet
If your plugin has no such option, filter the two URLs yourself. Add this with the Code Snippets plugin or in your child theme’s functions.php, and replace the slugs with the addresses of your own login and register pages:
add_filter( 'login_url', 'my_custom_login_url', 10, 3 );
function my_custom_login_url( $login_url, $redirect, $force_reauth ) {
$login_url = home_url( '/login/' );
if ( ! empty( $redirect ) ) {
$login_url = add_query_arg( 'redirect_to', urlencode( $redirect ), $login_url );
}
return $login_url;
}
add_filter( 'register_url', 'my_custom_register_url' );
function my_custom_register_url( $register_url ) {
return home_url( '/register/' );
}
These filters change the login and register URLs for the whole site, not only for GeoDirectory. After logging in, visitors only go back to the page they came from if your login page reads the redirect_to parameter.
The Register link only appears when “Anyone can register” is ticked at Settings > General in WordPress.