Hello I want to change redirect when login in theme my login wordpress now when login yet, it will go to profile page but I don't want this. I want to change it to go to my homepage. I find code in themed-profiles.php . I think I much edit code in line 166 but how to edit? please help.
if ( is_user_logged_in() ) {
//$redirect_to = get_option('shop-subearphone2');
$redirect_to = Theme_My_Login::get_page_link( 'profile' );
wp_redirect( $redirect_to );
exit;
Okay, I got it sorted. I just removed the redirection module from used a WordPress function and put function.php
function redirect_to_profile() {
$who = strtolower(sanitize_user($_POST['log']));
$redirect_to = get_option('home') . '/profile?' . $who;
return $redirect_to;
}
add_filter('login_redirect', 'redirect_to_profile');
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments