Title: Logout button?
Last modified: December 8, 2020

---

# Logout button?

 *  [phatman](https://wordpress.org/support/users/phatman/)
 * (@phatman)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/logout-button-9/)
 * Hi, how do I create a custom logout button for students? When they login a logout
   link appears in the message text but that disappears when you click another page!

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [augustus09](https://wordpress.org/support/users/augustus09/)
 * (@augustus09)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/logout-button-9/#post-13762597)
 * Hi,
 * I am sorry about this. The function is not available now.
 *  [touchofh](https://wordpress.org/support/users/touchofh/)
 * (@touchofh)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/logout-button-9/#post-13765382)
 * I am curious about this issue as well. [@augustus09](https://wordpress.org/support/users/augustus09/)
   are you saying that there is no way to add a ‘logout’ button or link to the lp-
   profile dashboard? Once logged in, how is a user supposed to logout???
 * Thanks…
 *  Thread Starter [phatman](https://wordpress.org/support/users/phatman/)
 * (@phatman)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/logout-button-9/#post-13766521)
 * What do you mean this function is not available now? It’s a basic security function
   lol.
 * edit. You just need to put it in the Profile menu
    -  This reply was modified 5 years, 6 months ago by [phatman](https://wordpress.org/support/users/phatman/).
 *  Thread Starter [phatman](https://wordpress.org/support/users/phatman/)
 * (@phatman)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/logout-button-9/#post-13771977)
 * OK, I had a look at the code. You need to edit the LearnPress plugin to add a
   sticky logout to the top of the lefthand menu:
 * /wp-content/plugins/learnpress/templates/profile/profile-cover.php
 * Ideally to prevent it being over written copy this page and put it in your child
   theme folder, if you have one, in /learnpress/profile/ folder (…or backup the
   page!)
 * Now edit profile-cover.php add the following after line 22 (i.e. after the avatar
   class div)
 * `<div style="margin-left:1em"><?php echo sprintf( __( '%s', 'learnpress' ), sprintf('
   <a href="%s">%s</a>', $profile->logout_url(), __( 'Logout', 'learnpress' ) ) );?
   ></div>`
 * Sesason to suit and serve warm 🙂
    -  This reply was modified 5 years, 6 months ago by [phatman](https://wordpress.org/support/users/phatman/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Logout button?’ is closed to new replies.

 * ![](https://ps.w.org/learnpress/assets/icon-256x256.gif?rev=3254420)
 * [LearnPress - WordPress LMS Plugin for Create and Sell Online Courses](https://wordpress.org/plugins/learnpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/learnpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/learnpress/)
 * [Active Topics](https://wordpress.org/support/plugin/learnpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/learnpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/learnpress/reviews/)

## Tags

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

 * 4 replies
 * 3 participants
 * Last reply from: [phatman](https://wordpress.org/support/users/phatman/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/logout-button-9/#post-13771977)
 * Status: not resolved