separate home page for logged in users 

Home Forums Legacy Support Support queries Other issues separate home page for logged in users 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #63107
    techcmantix
    Spectator
    i want to setup a different homepage for logged in users . now what we have is a same static home page for both guest and signed in users . but i want this home page different for signedout user and signin users . because signed out user will see the homepage designed for sales and signed in user must have different home page specific for their account (after sign in the user must not see the old sales homepage even when clicked on home , it must redirect to the different page ,what we set  )
    #63194
    H.K. Latiyan
    Participant
    Add the below code in your wp-admin->plugins->editor->select wplms customizer plugin and add the code in the wplms-customizer.php file:   add_action('template_redirect','custom_redirect_to_different_homepage',9999); function custom_redirect_to_different_homepage(){   if(is_user_logged_in() && is_front_page()){     wp_redirect('http://www.vibethemes.com');     exit;   } } NOTE: Change the vibethemes.com to your custom home page for logged in users.
    #63207
    techcmantix
    Spectator
    even guest can visit the second page but copying the url how to prevent guest from accessing the page meant for logged in  users
    #63276
    H.K. Latiyan
    Participant
    Edit the page and set the page template as members only. Let me know if this helps.
    #63294
    techcmantix
    Spectator
    it works thanks
    #63339
    H.K. Latiyan
    Participant
    Thanks for confirming.
    #73984
    techcmantix
    Spectator
    i want to make the dashboard as the homepage for logged in user . how to do it
    #74092
    H.K. Latiyan
    Participant
    Add the bellow code and remove the previous code: add_action('template_redirect','custom_redirect_to_different_homepage',9999); function custom_redirect_to_different_homepage(){   if(is_user_logged_in() && is_front_page() && defined( 'WPLMS_DASHBOARD_SLUG' )){     wp_redirect(bp_loggedin_user_domain().WPLMS_DASHBOARD_SLUG);     exit;   } }  
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘separate home page for logged in users ’ is closed to new replies.