Speedup WordPressLogin-logoutDonateGitHub

WordPress plugin: widget with login or logout link. It is the replacement of the default Meta widget.

"Login Logout" plugin add widget with login or logout link.

If user is not logged in there are two links:

  • login (after login action user will return to previous page);
  • register (if user can register) (if checkbox is active);

If user is logged in there are two links:

  • logout (after logout action user will return to previous page);
  • site admin (if checkbox is active);


  • Spanish translation made by Maria Ramos from WebHostingHub
  • Serbian translation made by Borisa Djuraskovic from WebHostingHub

If you need "login-logout" link you can use this code without the plugin:

<?php wp_loginout( get_permalink() ); ?>

If you need "register-admin" link you can use this code without the plugin:

<?php wp_register('', ''); ?>

121 thoughts on “Login-logout”

  1. Hi,
    I like ur plugin and already install it to my WP. Good if can do Login and register side by site. eg:

    Login | Register

    Can u do like above?

    • Yes, you can change display like this: "Login | Register"
      Just enable "[x]Inline (list or line of links);" option in the Login-logout widget options.

  2. Great plugin! However, I have a need that I don't see discussed. I have a members based site with public pages and private pages. If I send a link in an email to a member and if they then click on the link they are directed to a page to login. However, after logging into my site they are then directed to the page I set up in the widget.

    Is there a way to redirect them to the location they were originally trying to navigate to assuming a successful login?


  3. Hi,

    I just found your plugin, thanks! I wanted exactly this: login/logout without all the meta stuff.

    I'm also using a plugin called SimpleModal Login, which pops up a login box, instead of sending you to the login page. To make it work with yours, all I need to do was insert:


    into the [a] link you create for Login, and


    for the register link. But, I don't want to have a modified version just for that. I wonder if you could add an option to the admin panel that either has a checkbox for "Using SimpleModal Login? "
    (and inserts these classes if so), or just lets us specify the class to use for the register and login (and I guess, logout) links?


    • Wow, you did awesome trick. Thanks for great feedback.
      I am thinking about showing login-box in future releases but not immediately and only after user clicks "login link".
      As I can see "SimpleModal Login" plugin already solve it.
      I will check out their code and think how to do somethink like this in future "Login-Logout" versions.

  4. We were doing great-- A little problem with seniors seeing where they're supposed to register but outside of that great.. A big button that says register here dummy might be helpful.. Just kidding-

    I said were doing Great-- The plug I'm using to stop spammers was letting 6--700 comment spammers a month get through, You plugin cut that to 0, .Zero's a good number but the bots are getting smarter-- today several of them managed to register,, Idea's

    • I could recommend you to install some Captcha plugin (could be simple for the start).
      I did not see any other clever solutions.

  5. So bottom line you plugin is still redirecting users to the WP front end to actually login? Wouldn't it make more sense to present the Userrname and password fields within the widget and have it update to reflect the login status?

    • differences between default meta widget and Login-logout plugin:
      1) in Meta widget such items:

      • Site Admin
      • Log out
      • Entries RSS
      • Comments RSS
      • WordPress.org

      in Login-Logout plugin:

      • Site Admin
      • Log out
      • Custom item

      2) after login and logout Login-Logout plugin redirects to the same page, where you clicked the link; Meta widget has not;

      3) in Login-Logout plugin there are many options for configuration; Meta widget has not;

      Login-logout plugin did not show login-form I will explain why.
      Only 10% of the visitors will need to login so there is no need to show login-form for everyone.
      If user wants to login, than user can click the "login" link and he will be redirected to login-page and after login user will be redirected to the page where he clicked "login"-link.
      Not showing login-form - is feature and not a bug :)

      • I saw the difference, I'm just saying, it would be worth it to include the login fields within the widget and limit the interaction within the widget instead of jumping to the default WP login page. Anyway we can tweak the plugin to do that?

  6. I always see in my login-logout widget text "hello, username | logout" even if I am logged out. What could create this problem?

    • I think the problem is in cache. I suppose you are using some caching plugin and all users see the same page with the same string: "hello, username | logout".
      Try to disable your caching plugin.
      If you still need to cache your site, than try WP Super Cache plugin and enable "Don’t cache pages for known users" option in it. So, not logged in users will see cached page with text "login" and logged in users will see not cached page with text "hello, leonard | logout" for example.

    • Let me try to make my question clearer:

      Is there a way to edit the editor use the

      "Show admin link (if user is logged in);"

      option to redirect you to a different page of your choosing

      • You can disable "admin link" and add what you need to the "Extra item when user is logged in:" option. Like this: "my <a href="http://www.google.com">events</a>"

    • you can add login-logout only into widget zone.
      If you want to add it somewhere else, than you shold add it manually into the code.

  7. Hello, is how to insert the registry the terms of the site, with a box must be ticked to register? I've been looking for a plugin with this feature and have not found.

  8. how to customize the login page. would like the login page had the same layout of my site and did not have the name "wordpress".

  9. Hi, Fantastic plugin! Is it possible to show "Welcome, admin" on the same line with "Site Admin | Log out" rather on two separate lines?

    • Here are my suggestions:
      I could add the checkbox option called "inline list" for showing in one line: "Log out | Site Admin".
      And I could add the checkbox option called "wellcome text" for showing: "Welcome, admin".
      And if "inline" and "wellcome" is turned on then we will see this: "Welcome, admin | Log out | Site Admin"
      And if "inline" is off and "wellcome" is turned on then we will see the list:

      • Welcome, admin
      • Log out
      • Site Admin

      Or maybe you have better idea?

  10. Hello

    Great plugin
    Maybe you could add a check box that will display a login form with username and password if anyone wants this option.

    • I think that login form will not be needed for 80% of the visitors and the other 20% of users could visit login page when then want to login so there is no need to include this feature into plugin options. Sorry, but this feature will not be added into Login-Logout plugin for keep it as simple as posible. (At least now I think so, maybe something could be changed in future)

  11. Can you add an option to the settings to change the word log-in and log-off to another word in a different language? Maybe having a reset word after it has been changed would be great for basic users as well.

    Your plug-in is so simple and works really well :) Thank you so much.

    (Japanese Website)

  12. Hi , i have Version: 1.6.0 of Login Logout & when im NOT LOGGED IN - i do not see the "Register" button & users often ask how do they register....

    so is this a problem? because there is no dedicated settings page for this plugin for me to enable a checkbox etc to show it.

  13. Like this simple plugin. Only thing is that the logout redirect is not managable. I'm getting this 'not found' page in my theme. Could this be arranged in some way?

  14. I like your plugin a lot!
    Is it possible to change the layout? I guess it is, but I don't know how.. I would like to remove the 'login-logout' title, change remove the and stuff, but I can't find a .css file to change all this.. Hopefully you can tell me how! :)

    • This happens sometime and only with this plugin. Plugin does not contain complex code and it has small weight. I don't even know what is the problem. :(
      You should delete the plugin thru ftp to start your site working.
      You may try to install Login-Logout plugin in such ways:

      • download zip-archive of the plugin from the plugin page and upload it in your "dashboard=>plugins=>add new=>upload=>activate";
      • if the prev method did not help then upload the unzipped plugin via ftp and then activate it in the dashboard;
    • Please, update the plugin.
      In the latest version I added the checkbox to the widget options for enabling or disabling "register" and "admin" links.

      • I want to keep the login/register links when not logged in. but NOT have the "site admin" link appear when logged in. not sure why it has to be both or none.

        • It is fixed now - register and admin links are splitted and have different options. You should update your plugin to version 1.2.0 and also check if the Login-Logout widget exist in widget area.


Leave a Reply to webster Cancel reply