• Resolved illuzioner1

    (@illuzioner1)


    I’m fixing an Ecommerce website I inherited with some broken parts. Bear with me as I’m new to WordPress. The site uses WooCommerce and the Storefront theme.

    The site currently uses the WP-members plugin for membership tracking.

    I don’t see any way to put a login/logout button on the menu bar or under the product search. How do I add a simple login/logout button/link? I found a widget I can use in the footer or sidebars, but nothing else.

    Currently I have a menu entry under ‘membership’, but this does not provide a way for users to quickly see how to login or logout.

    What is the best approach for this?

    Thank you

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    The answer kind of depends on what you want (which also determines ease of implementation and complexity).

    A link to log in or log out by itself is nothing more than creating a menu item for those things. Not very elegant, but purpose serving.

    WP menus are not inherently dynamic unless you apply code snippets. Unlike the main content area and other areas of a WP site/template, you can’t ordinarily run shortcodes in a WP menu (although there are plugins that do create this ability). If you use a menu shortocode plugin, then you could use one or a combination of the plugin’s shortcodes to create the behavior you want (in fact there is a [wpmem_loginout] shortcode).

    I did write a tutorial post that is available for premium support subscribers that implements jQuery to dynamically display “log in” vs “log out” depending on the user state. That article is here:
    https://rocketgeek.com/tips-and-tricks/use-jquery-to-create-a-log-inlog-out-menu-link/

    Also, there is the Logged In Menus extension that creates clones of all of a theme’s menu areas so that there is a menu for the logged in state and one for the logged out state. That extension is currently available to support site subscribers. However, I am going to discontinue that particular extension in favor of implementing it in the main (freely available) plugin, so if that were the only reason you would sign up for premium support, you could just hold off and it will be part of version 3.2.0 (the current build, although not guaranteed to be stable, is available on bitbucket and github).

Viewing 1 replies (of 1 total)
  • The topic ‘Login link’ is closed to new replies.