How to change Login redirecting

Updated: April 25, 2017

I will show how to change login redirecting to other url then home inside CHILD THEME.

File where is set redirecting is located here: /wp-content/themes/directory2/ait-theme/widgets/AitLoginWidget.php

But there is own  class so please follow next instructions how to change redirecting inside CHILD THEME

1. Create child theme please follow next article here:

2. Copy two files with same folder structure to childtheme:

3. Inside child theme file /wp-content/themes/CHILD-THEMENAME/ait-theme/config/widgets.neon, you have to change 4. line – login to – my-login

4. Inside child theme file /wp-content/themes/CHILD-THEMENAME/ait-theme/widgets/AitLoginWidget.php you have to change  10 . line from

class AitLoginWidget extends WP_Widget
class AitMyLoginWidget extends AitLoginWidget

5. rename /wp-content/themes/CHILD-THEMENAME/ait-theme/widgets/AitLoginWidget.php

6. Now you can change this file which changes will appear at your site.
To change redirecting you have to look for ‘redirect’ so for example change 211 line to

$result .= wp_login_form( array( 'redirect' => get_home_url().'/?s=&category=&location-address=&a=true', 'form_id' => 'ait-login-form-widget', 'echo' => false, 'remember' => false,) );

Author: Dodo Sofranko

Support Staff
all themes, citadela layouts, plugins and graphics,
One time fee
Purchase Agency Lifetime Membership
Pre-sale Questions