0
votes

Kindly refer some plugin for wordpress post login. I have 3 page website site home, about and work normal and work secure, i want to show the work secure page if the user login with there email / just dummy id which i can generate. Unable to find the plugin for this login module. Custom menu with custom page

enter image description here

Using this script i am able to create menu but not able to redirect separate page

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' );

1

1 Answers

0
votes

If user is logged, he is redirect in 'about us' page

function my_login_redirect( $redirect_to, $request, $user ) {
    $redirect_to = get_page_link(ID_PAGE_ABOUT_US);
    return $redirect_to;
}
add_filter( 'login_redirect', 'my_login_redirect', 10, 3 );