Login/Logout Button
-
Hello.
I used “If Menu – Visibility control for menu items” plugin to make a “Login/Register” button which is hidden for logged-in users, and a “Profile” button, shown only to logged-in users with a submenu item – “Logout”.
It works okay, but when clicked, “Logout” redirects to a page asking “You are attempting to log out…Do you really want to log out?” and you first have to click “…log out” which contains a link that logs you out.
The sumbenu “Logout” is a custom link with address https://localhost/wordpress//wp-login.php?action=logout
As I said, it works, but I don’t like it. I want as soon as you click “Logout” to be logged out, not asked again. Also, when I finally do log out, I get redirected to the login page.
There are plugins for this, but they haven’t been updated in nearly a year. What’s a better way to do this, or at least get logged out immediately, and not be sent to the login page?
Thanks.
- The topic ‘Login/Logout Button’ is closed to new replies.