Hello,
Thanks for using WPS Hide Login.
I don’t understand very well. When WPS Hide Login is activated, you can reach your secret slug but wp-login.php doens’t redirects to 404. That’s right ?
Hello,
I’m calling the function as follows:
<a href="<?php echo wp_login_url(); ?>" title="Login">Login</a>
On every page apart from the 404 page, the link is correctly populated with the secret login url.
<a href="https://mysite.com/secret_login" title="Login">Login</a>
On the 404 page the url is returned as a hash symbol:
<a href="#" title="Login">Login</a>
This only happens on the 404 page, every other page I have checked is OK.
-
This reply was modified 9 months ago by
tonyastley.
I’m not sure this issue is due to WPS Hide Login.
What is the theme you’re using ?
I tested this with a vanilla install of 6.7.2 and the most basic of themes (the 3 files below). I installed only WPS hide login and the issue is still there.
style.css
/*
Theme Name: New Theme
Theme URI: http://newtheme.com
Description: A description about the theme
Author: Author Name
Author URI: http://www.author.com
Version: 1.0
*/
index.php (displays login url correctly)
<!DOCTYPE html>
<html>
<head>
<title>My website</title>
</head>
<body>
<h2>Content Title</h2>
<p><a href="<?php echo wp_login_url(); ?>" title="Login"><?php echo wp_login_url(); ?></a></p>
</body>
</html>
404.php
<!DOCTYPE html>
<html>
<head>
<title>Page Not Found</title>
</head>
<body>
<h2>Page Not Found</h2>
<p><a href="<?php echo wp_login_url(); ?>" title="Login"><?php echo wp_login_url(); ?></a></p>
</body>
</html>
Is there something obvious I am missing here?
Just to re-iterate, it’s only the 404.php that this happens on, every other page works OK:
search.php – fine
privacy-policy.php – fine
etc