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.
Sridhar,
I have altitude pro theme, I’ve used one of your tutorial to have full width soliloquy slider on front page (https://sridharkatakam.com/how-to-replace-front-page-1-image-section-with-a-soliloquy-slider-in-altitude-pro/)
When I implement this tutorial everything looks good on desktop but on mobile this menu hides behind the slider. Any solution?
Can you provide the URL of your site?
Here is the link to my website: https://webtalkies.com
I think this issue has to do with the Soliloquy slider. Please take a look at my comments (https://sridharkatakam.com/how-to-replace-front-page-1-image-section-with-a-soliloquy-slider-in-altitude-pro/). What happens is, we took out image section from the front-page.php and height of this section is determined dynamically by global.js. Again, this is just my analysis, your expert opinion would really help me here.
Thanks
In the 960px media query of style.css, try changing http://pastebin.com/raw/qgHM0iW7 to http://pastebin.com/raw/0zjT1tQN.
That works.
Thanks Sridhar.
Almost have it working. I am developing a site using Centric Pro and am using the Header Widget to display a custom menu. How do I modify to append the login menu to the custom menu widget? I am assuming this code needs to be modified but not sure how:
// Change ‘primary’ to ‘secondary’ to add extras to the secondary navigation menu
if ( ‘primary’ !== $args->theme_location )
return $menu;
URL: http://sccwp.polishedwp.com/
How would we use this in a header widget menu?
That is my question too?
How about adding a “Register” option to the toggle?