This is based on the earlier tutorial titled How to slide toggle Gravity Forms form by clicking a link/button in Primary Navigation in Genesis.
In this article we are going to add 'Login' menu item to the right of Primary Navigation in Genesis for non-logged in users and 'Member Links' menu item for logged in users. Hovering on 'Login' will slide toggle WordPress login form. Once the user fills the form and submits, the 'Login' menu item will change to 'Member Links'. When this is hovered, a custom menu is set to be shown with 'Logout' menu item automatically added as the last item.
Screenshots:
For users who are not logged in:
For users who are logged in:
Step 1
a) Create a file named desktop.js in your child theme's js
directory (create if not existing) having the following code:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.