Hello,
Can someone point me to the right direction as to where i can find the url that is passed to the verification link since it shows wp-login which I do not use and i want to create a filter to replace the string wp-login with ‘my-custom-login-page’ ?
I checked tds_email_notifications.php but did not find anything. I only see
$dashboard_permalink
$account_details_permalink
$subscriptions_permalink
for password reset mails i added this and it works fine. Is there anything similar for the verification link?
add_filter( ‘td_login_password_reset_link’, function($password_reset_link) {
return str_replace( ‘wp-login.php?’, ‘my-custom-password-reset-page/?password_reset&’, $password_reset_link );
});
I am trying to find the name of a similar function for the verification link but i don’t seem to be able to find it
-
This topic was modified 1 year by
panos.fasoulis.
i fixed it by adding the following in functions.php I am going to leave it here in case someone needs it. But i am still curious if i did something wrong and there was an easier way like with the password
add_filter( ‘wp_mail’, ‘custom_modify_activation_email’, 10, 1 );
function custom_modify_activation_email( $args ) {
// Check if email is activation email by looking for unique strings.
// subject “Activate account” message “action=tds_validate”.
if ( strpos( $args[‘subject’], ‘Activate account’ ) !== false ||
strpos( $args[‘message’], ‘action=tds_validate’ ) !== false ) {
$args[‘message’] = str_replace( ‘wp-login.php’, ‘my-custom-login-page’, $args[‘message’] );
}
return $args;
}
add_action(‘template_redirect’, function() {
if ( isset($_GET[‘action’]) && $_GET[‘action’] === ‘tds_validate’ && strpos($_SERVER[‘REQUEST_URI’], ‘my-custom-login-page’) !== false ) {
$query_string = $_SERVER[‘QUERY_STRING’];
wp_redirect( site_url(‘/wp-login.php?’ . $query_string), 301 );
exit;
}
});
Now I seem to have notice a different issue altogether and upon disabling all my custom edits i saw that this was happening from the start I just never noticed it.
When someone logs in from the tagdiv login page it redirects them to the same page eg from my-custom-tag-div-login to my-custom-tag-div-login/#
But when they enter their user credentials again for the second time it seems to log the user normally…
Anyone noticed something similar before?