-
Author
-
December 18, 2014 at 21:37 #39642lovewpParticipant
@Abe Question, where would I find “childs function.php file” so I can input the following code from @sharmstr
function 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) ){
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( ‘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();
}December 19, 2014 at 00:41 #39651sharmstrModeratorthemes/kleo-child/functions.php
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
December 31, 2014 at 08:20 #40764lovewpParticipant@Abe Can you please tell me how to get your child theme to work, I have the folder inside of themes, it contains your functions and style files, I’m doing something wrong, I cannot get the above code to function, I don’t think it’s even being seen, please help me out.
Thanks.
December 31, 2014 at 13:31 #40780sharmstrModeratorIf you just copied the code from above it wont work. There are are left and right single quote characters. You need to change all of those to regular quote characters.
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
December 31, 2014 at 20:21 #40812sharmstrModeratorDelete the code in your childs function file
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
January 5, 2015 at 17:19 #41032sharmstrModerator“Why would I delete it?” Because you said you didnt think it was reading your childs function.php file. If you delete it and dont get the error, then you would have proven to yourself that it was reading that file. We already knew it was, I was trying to get you to believe that.
Now, for the code you have pasted in here, please re-paste with with pre tags around it so it doesnt covert the single quotes to fancy quotes.
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 forum ‘KLEO’ is closed to new topics and replies.