-
Author
-
October 14, 2014 at 07:26 #31662PDMuniversalParticipant
I know that you can change KLEO to redirect you to the wordpress default dash or refresh the page through options. Is there a way to have it so once you login you are redirected to a different page. (trying to redirect to members page once you login)
October 14, 2014 at 08:19 #31663KieranParticipantHaven’t tried this myself, but I have seen it recommended a few times as well as it being recently updated / highly rated on the WordPress directory.
October 14, 2014 at 08:27 #31664PDMuniversalParticipantYeah i have that but its integrated with buddy press. But not integrated with the KLEO login. Hmm maybe ill look around some more and double check
October 14, 2014 at 15:51 #31684sharmstrModeratorPut this in your childs function.php file and change ‘/activity’ to wherever you want them to go. Also, make sure you have ‘reload current page’ set in theme options -> Misc -> Login redirect for Popup
COPY CODEfunction kleo_ajax_login() { // Check the nonce, if it fails the function will break check_ajax_referer( 'kleo-ajax-login-nonce', 'security' ); // Nonce is checked, get the POST data and sign in user $info = array(); $info['user_login'] = $_POST['log']; $info['user_password'] = $_POST['pwd']; $info['remember'] = (isset( $_POST['remember'] ) && $_POST['remember'] === true) ? true : false ; $info = apply_filters('kleo_ajaxlogin_atts', $info); $user_signon = wp_signon( $info, false ); if ( is_wp_error( $user_signon ) ){ $error_msg = $user_signon->get_error_message(); echo json_encode(array( 'loggedin' => false, 'message' => '<span class="wrong-response"><i class="icon icon-attention"></i> ' . $error_msg . '</span>' )); //echo json_encode(array( 'loggedin' => false, 'message' => '<span class="wrong-response"><i class="icon icon-attention"></i> ' . __( 'Wrong username or password. Please try again.', 'kleo_framework' ) . '</span>' )); } else { if ( sq_option( 'login_redirect' , 'default' ) == 'reload' ) { $redirecturl = apply_filters( 'kleo_modal_login_redirect', '/activity/', '', $user_signon ); } else { $redirecturl = apply_filters( 'login_redirect', '', '', $user_signon ); } echo json_encode(array('loggedin'=>true, 'redirecturl' => $redirecturl, 'message'=> '<span class="good-response"><i class="icon icon-ok-circled"></i> ' . __( 'Login successful, redirecting...','kleo_framework' ) . '</span>' )); } die(); }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The topic ‘KLEO Login Redirect’ is closed to new replies.