Title: Logout Button
Last modified: November 24, 2020

---

# Logout Button

 *  Resolved [Sergey M.](https://wordpress.org/support/users/weboved/)
 * (@weboved)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/logout-button-8/)
 * Hi,
 * Is there any possibility to create like logout button?
    For example: visitor 
   open an url/website. He receive a window to put the password. He did it and he
   receive an access to the page/website. Then he press “logout” button and after
   this action he hasn’t possibility to see pages, just need to put password again.

Viewing 1 replies (of 1 total)

 *  [patrickposner](https://wordpress.org/support/users/patrickposner/)
 * (@patrickposner)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/logout-button-8/#post-13819271)
 * Hey [@weboved](https://wordpress.org/support/users/weboved/),
 * thanks for your question!
 * That would be pretty easy to do actually.
 * I built a small code snippet for your functions.php here: [https://gist.github.com/patrickposner/21ca64cb1dd2159a36231e3055cc3619](https://gist.github.com/patrickposner/21ca64cb1dd2159a36231e3055cc3619)
 * Place the shortcode [passster-logout] on your page and a button should appear.
   
   When someone clicks the button, it deletes the current password and logs the 
   user out.
 * There is also an optional redirect which you can use to redirect the user to 
   a logout page or something like that.
 * Best regards,
    Patrick

Viewing 1 replies (of 1 total)

The topic ‘Logout Button’ is closed to new replies.

 * ![](https://ps.w.org/content-protector/assets/icon-256x256.png?rev=2206760)
 * [Passster - Password Protect Pages and Content](https://wordpress.org/plugins/content-protector/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-protector/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-protector/)
 * [Active Topics](https://wordpress.org/support/plugin/content-protector/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-protector/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-protector/reviews/)

## Tags

 * [Logout](https://wordpress.org/support/topic-tag/logout/)

 * 1 reply
 * 2 participants
 * Last reply from: [patrickposner](https://wordpress.org/support/users/patrickposner/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/logout-button-8/#post-13819271)
 * Status: resolved