I’m trying to figure out the best method to achieve an alternate menu navigation for a specific user, with a simple modal overlay for login on that page.
I’d like to create a ‘guest’ user account (allowing access to a portfolio section I want hidden from the public). When I send users the link to the portfolio page, I would like a login modal to overlay the content prompting for user and password.
What is the best method for achieving this with PRO?
I’ve been researching different methods such as WPForms for login (requires $199 a year addon),
standard WP password protection (too basic),
functions.php edit
function my_wp_nav_menu_args( $args = ‘’ ) {
if( is_user_logged_in() ) {
$args[‘menu’] = ‘logged-in’;
} else {
$args[‘menu’] = ‘logged-out’;
}
return $args;
}
add_filter( ‘wp_nav_menu_args’, ‘my_wp_nav_menu_args’ );
The functions.php only seems to give options for login/logged out. Can this be edited for specific logged in users?
I would prefer a specific user as there will be customer login for the store so this would cause conflict.
Really appreciate any help you can give.