WordPress.org

Support

Support » Plugins and Hacks » Theme My Login » [Resolved] Logout Link

[Resolved] Logout Link

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jeff Farthing

    @jfarthing84

    Where?

    Hi Jeff, when you add the login page to wp menus and in the widget. When the user is logged in the Log In menu item filters to ‘Welcome and in the widget as well.

    Jeff, I just updated to Version 6.4-alpha and seemed to have fixed the ‘Log Out’ link in user links display correctly to “Log Out” versus “Welcome,” in the widget, although the wp menu item for the TML LogIn Page still displays Welcome when a user is logged in.

    I’m getting LOGIN as the link when I’m Logged In. So LOGOUT not showing.
    using latest version.

    Plugin Author Jeff Farthing

    @jfarthing84

    Two things – the Login link will only change to logout when using a wp_nav_menu and also when your theme properly utilizes The Loop.

    I had the same problem.

    When adding the widget to a sidebar, the logout link appears as ‘Welcome’.

    This issue appears to be on line 737 of class-theme-my-login-template.php of version 6.3.8 which reads:

    echo '<li><a href="' . wp_logout_url() . '">' . self::get_title( 'logout' ) . '</a></li>' . "\n";

    I edited that to hard code the logout link for now:

    echo '<li><a href="' . wp_logout_url() . '">Logout</a></li>' . "\n";

    Plugin Author Jeff Farthing

    @jfarthing84

    There’s no way that line could cause it to happen, as the method get_title checks that 'login' == $action.

    I think it is to do with the way I set up the widget. I’ll detail that in case it helps. I don’t think it should be that odd a use, but maybe it is.

    1. I am not using a widget when the user is logged out.
    2. I am not using the title in the widget.
    3. The only two options I’ve set are
      • Show when logged in
      • Show login link (because I assumed it would revert to log out when the user was logged in)

    I see now that my assumption that login would simply become ‘log out’ was not correct. The logout link is actually appended to the title, which I am not using. I was not aware of that.

    So, my change fixed it for me, but it was not really ‘fixing’ anything, just making it work in my particular set up. It would be nice to have a ‘Show logout link” option, that would just say ‘log out’.

    I hope that explanation helps.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] Logout Link’ is closed to new replies.
Skip to toolbar