- Step 1 Download, install and activate the WordPress plugin “Menu items visibility control”.
- Step 2Create 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"]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 3Now you'll have to add your new log in page as a menu item to your main navigation. In your WordPress sidebar menu go to 'Appearance > Menus > and then create your own menu or add a menu item to your existing page.
- Step 4 You'll now want to add the newly created Log In page as a menu item.
- Step 5Once the "Log In" page is added as a menu item, click the drop down link next to 'Log In' to expand the menu item options for the log in link.You'll want to paste the below code into the field called "Visibility:" and then click 'Save Menu'. See the image below for an exact example of how it works.
- Step 6Now all that’s left is to add the Log Out link. To do this on the menu page click “Links” and enter “/memberium:logout:/” in the URL field and “Log Out” in the field called ‘Navigation Label’. Then click ‘Add to Menu’. Note that this function works only on Memberium Version 2.40.5 and above and also make sure you're using this on the directory where you have Memberium installed. For example, if you have a WordPress install on http://www.yourdomain.com/members, the link should look like this, /memberium:logout:/members/ Example: The above link will redirect to Home Page after logging out.If you want to redirect to a different page, for instance, to this page: “http://testinginfusionsoft.com/testing/99a” your link should look like one of these examples:/memberium:logout:/testing/99a
Once the menu item is added, You’ll want to paste the below code into the field called “Visibility:” just like you did for login page in Step 5 and then click ‘Save Menu’.
- Step 7All that's left is to set the log out redirect and then we're all done. In your WordPress admin sidebar to Memberium > Memberships, click on the membership level name that you need to change the logout page for and then select the "Membership Logout Page" from the dropdown under "Special Pages"
How to add a Log-Out and Log-In link to your main WordPress menu/navigation
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...