Facing same issue suddenly.. How can I remove #undefined ?
Facing same issue suddenly.. How can I remove #undefined ?
Hi,
I am running on 1.7v and having the same error. Please provide fix.
FTP deatils:
Hi,
If anyone is looking for instant fix and don’t want to wait for future releases can use this code.
1) Add following code to functions.php
———————————————————————————
add_action( ‘wp_login_failed’, ‘my_front_end_login_fail’ ); // hook failed login
function my_front_end_login_fail( $username ) {
$referrer = $_SERVER[‘HTTP_REFERER’]; // where did the post submission come from?
// if there’s a valid referrer, and it’s not the default log-in screen
if ( !empty($referrer) && !strstr($referrer,’wp-login’) && !strstr($referrer,’wp-admin’) ) {
wp_redirect( ‘./my-account/?login=failed’ ); // let’s append some information (login=failed) to the URL for the theme to use
exit;
}
}
function fv_error_func( $atts ) {
extract( shortcode_atts( array(
‘type’ => ‘text’,
‘name’ => ”,
), $atts ) );
global $wp_query;
if( isset( $wp_query->query_vars[‘login’] ) && ($wp_query->query_vars[‘login’] == ‘failed’) )
return ‘
<div id=”login-error” style=”font-size: 16px; background-color: #FFEBE8;border:1px solid #C00;padding:5px;”>
Login failed: You have entered an incorrect Username or password, please try again or Use <b>Forgot Password?</b>
</div>’;
else
return ;
}
add_shortcode( ‘fv_error’, ‘fv_error_func’ );
function add_query_vars_filter( $vars ){
$vars[] = “login”;
return $vars;
}
add_filter( ‘query_vars’, ‘add_query_vars_filter’ );
———————————————————————
2) add shortcode “fv_error” on my-account page for on page error.
Thanks for the reply. I know you will try to update in some future version
but can I you provide me some solution for now?
As it is quite possible I have seen on other themes.(eg. Flatsome) instead redirecting they are giving on page error.
Don’t you guys think this should be the default behavior for theme instead of new plugin.?