How to add a Log-Out and Log-In link to your main WordPress menu/navigation

Memberium Admin — 

In this post I'm going to show you how to add a log in and log out link to your main WordPress navigation. The log in link will only appear visible to non logged in members. Vice-versa, the log out link will only show up for logged in members.

This is a easy task to complete that should take 5-10 minutes depending on your familiarity with WordPress. If you’d prefer to add a log-in / log-out link to your sidebar, click here. Let's get started with adding a log in link to your WordPress menu...

  • Step 1Create a new WordPress page with the title of "Log In" and paste the following code into that page's content area editor:
    [memb_loginform username_label="Email Address" button_label="Login Now" password_label="Password"]
    This will create a login page that has a Memberium login form on it. Publish this page after the above code is added. You'll be able to send this URL to any of your members to log in to in the future.
  • Step 2Set the new login page as the Login Page in Memberium > Settings > Login.Once you've set the page here, your all set. We just need to add a menu item.
  • Step 3Go to Appearance > Menus and either create a new menu or edit your existing one. You're going to add a new custom menu item with the following details: URL:
    /memberium:loginlogout:/
    Navigation Label:
    [memb_is_logged_in]Logout[else_memb_is_logged_in]Login[/memb_is_logged_in]
  • Step 4 That's all you have to do! Check it by going to your site homepage (or wherever your menu is) and then see if the "Logout" link is showing. You can click it to test it.Then since you'll be logged out, you should see the "Login" link that will take you to the login page you setup in step 1.
  • Was this Helpful?
  • YesNo