Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

How to put LOG OUT in Navigation Menu?

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › How to put LOG OUT in Navigation Menu?

Tagged: navigation menu, WP eMember

  • This topic has 4 replies, 2 voices, and was last updated 12 years, 5 months ago by admin.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • January 6, 2013 at 7:59 pm #8275
    raajtram
    Member

    Hello. I want to put a LOG OUT button for logged in members. I’ve followed all the steps mentioned at http://www.tipsandtricks-hq.com/wordpress-membership/show-different-navigation-menu-to-your-members-and-non-members-551 but the problem yet persists.

    I’m using the following code –

    <?php

    if ( wp_emember_is_member_logged_in() ) {

    tfuse_menu(‘members’);

    } else {

    tfuse_menu(‘default’);

    }

    ?>

    But yet, the problem persists. But one thing is that the DEFAULT menu DOES display for NON-LOGGED-IN members, but the other menu does not display for logged-in members.

    Is there anything I’m missing?

    January 7, 2013 at 1:05 am #52832
    raajtram
    Member

    Anyone?

    January 7, 2013 at 1:46 am #52833
    admin
    Keymaster

    You don’t need to follow that tutorial just to add a “Logout” link in the navigation menu.

    Simply create a link in your navigation menu with the following URL (this is will work as your logout link):

    [http://www.your-domain.com/?event=logout]

    Change the “your-domain.com” to your actual domain name.

    January 7, 2013 at 5:38 am #52834
    raajtram
    Member

    Sorry for the bump.

    But doing it this way will also show the LOGOUT tab to non-logged-in members. That’s why I though it’s a must to follow that tutorial.

    Please guide me on the same.

    Thanks

    January 7, 2013 at 6:38 am #52835
    admin
    Keymaster

    Okay yeah sure. Using the nav menu approach is better. You could also use the compact login widget in the header of your site:

    https://support.tipsandtricks-hq.com/forums/topic/wp-emember-creating-or-customizing-the-compact-login-widgetlinks

    With that said, in the above code you are using your theme specific function for the menu which I can’t help you with (this is something only your theme developer can only help). The proper way to add the WordPress 3.0 nav menu is to use the following code (given your theme supports it):

    <?php
    if ( wp_emember_is_member_logged_in() ) {
    wp_nav_menu( array( 'menu' => 'logged-in-members' ) );
    } else {
    wp_nav_menu( array( 'menu' => 'normal-visitor-menu' ) );
    }
    ?>

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ