I am using wordpress 4.6.
I have template register form with page URL domain-name/account/?action=register
I want to redirect it to home page after register but instead of that it show
message "You have logged in. You better go to Home" with page URL
domain-name/account/?result=registered.
I already try below code in theme functions.php
function __my_registration_redirect(){
wp_redirect( '/my-account' );
exit;
}
add_filter( 'registration_redirect', '__my_registration_redirect' );
but nothing happens