How to Change the “Please Login to comment” Link
-
For security reasons we redirect /wp-login.php/ to /log-in/ using the following code in the functions.php file:
add_action('init','custom_login'); function custom_login(){ global $pagenow; if( 'wp-login.php' == $pagenow && $_GET['action']!="logout") { wp_redirect('https://xxxxx/log-in'); exit(); } }
The WP-Discuz “Please login to comment” link is as follows:
https://xxxxx/wp-login.php?redirect_to=https://xxxxx%2Fcurrent_page%2F
The WP-Discuz “Please login to comment” link takes us to the custom login page but does not bring us back to the current page after logging in.
How can this issue be resolved?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to Change the “Please Login to comment” Link’ is closed to new replies.