allandore
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Change Personal Data Export Confirmation URLHello !
I know it’s been a while but I faced the same issue and I did a trick which worked for me.
Change the bad string in your url, in your functions.php :
function redirect_to_good_link() {
// GET THE ACTUAL URL
$actual_link = “https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”;// IF THERE’S SOME PART OF THE GDPR LINK
if (strpos($actual_link, ‘?action=confirmaction&request_id=’) == true) {// REPLACE YOUR CUSTOM STRING BY THE GOOD ONE
$new_url = str_replace(‘unique-login-page/’, ‘wp-login.php’, $actual_link);// AND REDIRECT TO IT
wp_redirect($new_url);
exit();
}
}
add_action(‘template_redirect’, ‘redirect_to_good_link’);Hope it works for you ??
Okay I found a solution, an ugly one but it works.
In page.php, put everything you only want on your custom login form (where you add [user-meta-login]) between an if requirement. We will check if we are or not on the custom login page to add specific html tags.
In my case, this is the URL of the page : localhost/login-custom/
So here we are :
<? php
// Get the entire URI of the actual page
$actual_link = “https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”;// If in the URI there’s the name of the login custom page
if (strpos($actual_link, ‘login-custom’) == true) {// Put everything you want
<div class=”test”></div>}
?>
And after that in your CSS you can refer to theses classes.
Ugly isn’t it ^^ ?
- This reply was modified 6 years ago by allandore.