Problem: When users don't fulfill criteria in a registration form, an error message shows up (e.g., "Password must be 12 characters long"), but the page reloads too quickly which doesn't allow the user to properly read the whole message.
Solution needed: I've attempted to delay the script causing the page reload by adding a setTimeout to delay the page reload, but with no success. Any ideas?
Context: The registration form in question is located at https://mycareinsite.com, which I've created using Wordpress/Custom Code/Plugins.
I've attempted to follow the solution outlined at the following thread, but to no avail: JS - location reload with delay after function executed
function clean_login_url_cleaner( $url ) {
$query_args = array(
'authentication',
'updated',
'created',
'sent',
'restore'
);
return esc_url( remove_query_arg( $query_args, $url ) );
}