Adding a logout link to the wordpress menu for members

Members site with a custom login page. Users can't find how to log out because the admin bar is hidden. Is there a logout URL I can drop into the menu that sends them back to the homepage afterwards?
2

Leave A Reply

Log in to post an answer.

2 Answers

dan_30 Oct 14, 2026
deepakmarketing
A custom link to /wp-login.php?action=logout works but it doesn't carry the security nonce, so users get an "are you sure you want to log out" page first. If that bothers you, use a small login/logout menu plugin or a snippet using wp_logout_url(), which also lets you show the link only to logged-in users.