The primary goal is to hide that the site is driven by wordpress. I’ve got the login part all locked up, but the logout URL still has those blasted wp
delineators that give away it’s a wordpress site.
Is there a way to somehow mask this URL? Perhaps by a conjunction of custom redirect where the client-side link goes to www.site.com/logout/
but something in functions.php
rebuilds the actual logout link?
I’ve tried variations of wp_logout_url('$index.php')
but this only redirects. I’ve also tried
add_filter( 'wp_logout_url', 'cusotm_logout' );
function cusotm_logout()
{
// set your URL here
return 'http://www.site.com/logout/';
}
Not only does this last one not work, it also appends title=
to the end of the URL. I’m not sure if the logout doesn’t work because of that or if the function itself is the wrong approach entirely.
I only use plugins if I absolutely have to. Looking for a self-managed solution… without needing to mod_rewrite
if at all possible.
Replacing just the URL is not enough. You have to tell WordPress what to do with the new URL.
Sample code, creates a log-out URL like
example.com/logout=1
and redirects to front page or custom URL after logging the user out:As plugin on GitHub, because this is pure plugin territory. And you cannot really hide WordPress.
I guess the problem is markup like this:
Note the missing
"
.