Login redirect

6.61K viewsGeneral
1

after users login it goes to /wp-admin which is restricted

1

Add this hook:

function my_redirect_to_ap_base_page() {
  return ap_base_page_link();
}

add_filter('login_redirect', 'my_redirect_to_ap_base_page');

In any file is added to that?

Thank you, Rahul!

theme functions.php

How would the function look like if I would like to redirect the user to the home page and not the base page?

I made a functions.php file in my child theme & entered the hook

now i get page distortion & login doesn’t work

@chris Please chnage ap_base_page_link() to home_url(‘/’).
@Tarrence This hook has nothing to do with styles unless there is something missing. Please give us gist link to your functions.php

Many thanks Kumar.

@Tarrence, its look like you have added your code before <?php tag. Please add it at the end of file.

I added tag to child theme thanks

You are viewing 1 out of 3 answers, click here to view all answers.