• 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)
  • Hi,

    I am sorry about this. The function is not available now.

    I am curious about this issue as well. @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

    (@phatman)

    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 3 years, 10 months ago by phatman.
    Thread Starter phatman

    (@phatman)

    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 3 years, 10 months ago by phatman.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Logout button?’ is closed to new replies.