Hi,
I don’t know why your function code is not working. However, the following plugin works well with ours. Some of our users have reported great results using both plugins and Rename Login Page feature is also active.
https://wordpress.org/plugins/peters-login-redirect/
Let me know if the above works for you.
Thank you
-
This reply was modified 5 years, 4 months ago by
mbrsolution.
Well, the idea is to not have to install another plugin.. if i had to do so, I would then install the old plugin we had, that worked just fine. Did you try our above code on one of your sites? Did it work? It definetely does not work on our side. I tried moving that piece of code to the top of our functions.php file with no luck. Any other suggestion?
Thanks
Kind regards
Hi,
Did you try our above code on one of your sites?
Yes I have. However that function is customized for your site and will not work elsewhere.
If you are going to use this feature “Rename Login Page” in our plugin and require extra functionality, then I recommend the above mentioned plugin.
Kind regards
I know the function is customized, but the hooks used are universal, so im trying to understand what is it making this not to work..
Hi,
if i had to do so, I would then install the old plugin we had, that worked just fine
Can you share the link to your old plugin? The function is probably hooking into your old plugin.
Regards
Hi, thank you for sharing the plugins URL.
If you want to use your function “Designed to work with your other plugin” with our plugin you will need to make some changes. Below are a couple of samples hooks that might help you.
Sample 1
This hook added to your functions.php file, allows you to redirect to a 404 page error URL instead of a 403 WordPress error message.
add_action( 'template_redirect', 'services_redirect');
function services_redirect() {
if (!is_user_logged_in() && strpos($_SERVER['HTTP_REFERER'], "services") !== false){
wp_redirect( site_url('/customlogin/') );
exit;
}
}
Sample 2
This hook added to your functions.php file, allows you to redirect to a page of your choice.
add_action('aiowps_before_wp_die_renamed_login', 'redir_aiowps_before_die');
function redir_aiowps_before_die(){
wp_redirect('https://whatever-page-you-want.com');
exit;
}
Kind regards
Hey! thanks a lot this one worked for me:
add_action( 'aiowps_before_wp_die_renamed_login', 'services_redirect');
function services_redirect() {
if (!is_user_logged_in() && strpos($_SERVER['HTTP_REFERER'], "services") !== false){
wp_redirect( site_url('/customlogin/') );
exit;
}
}
Really appreciate your help guys!