• Hi, WP community

    Can anyone show some light on these three issues:
    1. How to link the native TutorLMS login popup to a button or URL.
    2. How to have different nav menus before and after login.
    3. A logout button that redirects to the homepage instead of wp-admin

    Please guide me through this.

    • This topic was modified 3 years, 5 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
    • This topic was modified 3 years, 5 months ago by James Huff.
    • This topic was modified 3 years, 5 months ago by James Huff.

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

Viewing 1 replies (of 1 total)
  • Hello @elaimte

    1/ You need to create one modal or page template, then you need to add the code of the login form. Please follow the file location, here you will find login form code.

    tutor/templates/global/login.php

    2/ Here is two way to use different menu for logged in and logged out user. 1/ You can use the WordPress plugin 2/ You can use custom code. Please try this code

    function wpc_wp_nav_menu_args( $args = '' ) {
    if( is_user_logged_in() ) { 
        $args['menu'] = 'logged-in'; // Replace logged-in with you menu name
    } else { 
        $args['menu'] = 'logged-out'; // Replace logged-out with you menu name
    } 
        return $args;
    }
    add_filter( 'wp_nav_menu_args', 'wpc_wp_nav_menu_args' );

    3/ Please use the code below

    add_action('wp_logout','tutor_redirect_after_logout');
    function tutor_redirect_after_logout(){
             wp_redirect( 'Your redirect URL here' );
             exit();
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Issue with TutorLMS native login.’ is closed to new replies.