Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › With Site Lock on, Home (root) redirects to Members
Tagged: front page, login, redirect, site lock
- This topic has 6 replies, 4 voices, and was last updated 8 years ago by H.K. Latiyan.
Viewing 7 posts - 1 through 7 (of 7 total)
-
AuthorPosts
-
February 17, 2016 at 3:01 am #29263stephenParticipantI'm using WPLMS, no child themes, with demo data. I'd like to have Site Lock enabled, and when user logs in will go to home page. I have these settings: WPLMS > Misc > Site Lock: yes Settings > Reading > Front Page Displays: Login LMS > Student Login Redirect: Home Page LMS > Instructor Login Redirect: Home Page When user logs in, he is redirected to Members page. If user goes to root (mysite.com/), he is redirected to Members page (mysite.com/members). I want the user to be redirected to Home page (mysite.com/home) -- is there a way to do this without NOT using a hack in a child theme, NOT editing WPLMS custom plugin? Thank you!February 17, 2016 at 3:17 pm #29571Anshuman SahuKeymasterYes we have coded this into site lock feature coz user cannot got the register page which is set as home in the wordpress settings . We will try adding a setting for the home page redirection in case of site lock .February 17, 2016 at 3:44 pm #29580stephenParticipantSo, if I want logged-in users to be redirected to homepage instead of members page, my best option is to use a third-party plugin for site lock right now?February 17, 2016 at 4:35 pm #29600stephenParticipantI've tried both of these scripts on the WPLMS customizer, and neither works: add_filter('login_redirect','wplms_custom_login_redirection',100,3); function wplms_custom_login_redirection($redirect_url,$request_url,$user){ $url = '/home'; return $url; } function bp_help_redirect_to_home(){ global $bp; if( is_user_logged_in() && bp_is_front_page() ) bp_core_redirect( bp_get_root_domain() . '/home' ); } add_action( ‘get_header’, ‘bp_help_redirect_to_home’,1);February 18, 2016 at 3:03 pm #29994Anshuman SahuKeymasterTry increasing the priority if these :
dd_filter('login_redirect','wplms_custom_login_redirection',9999,3);
function wplms_custom_login_redirection($redirect_url,$request_url,$user){
$url = '/home';
return $url;
}function bp_help_redirect_to_home(){
global $bp;if( is_user_logged_in() && bp_is_front_page() )
bp_core_redirect( bp_get_root_domain() . '/home' );}
add_action( ‘get_header’, ‘bp_help_redirect_to_home’,9999);
November 9, 2016 at 11:41 am #78799paulobaldowSpectatorI have the same problem, if the user is logged and insert the root url in browser or click in logo homepage link instead to go to the homepage, i am redirected to members page.November 10, 2016 at 11:30 am #78965H.K. LatiyanParticipant@paulobaldow: Please create your own topic for your issues, and do not reply on some other topics. For this we have already given the setting in the wp-admin->wplms->miscellaneous->site lock logo link page, refer: http://prntscr.com/d5h1l3 You can select any page here and the user will be redirected to that page when they click on site logo. Make sure you do not add homepage here and can add any page you like instead of homepage. -
AuthorPosts
Viewing 7 posts - 1 through 7 (of 7 total)
- The topic ‘With Site Lock on, Home (root) redirects to Members’ is closed to new replies.