Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Author Posts
February 28, 2019 at 6:20 am #3253671


We have a custom login from for customer. WordPress supports only one active blog for a user at a time.

$primary_blog = get_active_blog_for_user( $user->ID );
$redirect_url = get_blogaddress_by_id($primary_blog->blog_id);

This returns the url without the language code. So before login if I switch my language to X and after login the page switches back to the default language as the url returned from the above code is the default site URL

February 28, 2019 at 10:59 pm #3257650


Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)


you might be able to find a hook within the following documentation to assist you in achieving the desired behavior with this custom code


let me know your results

The topic ‘[Closed] Redirect URL when user(customer) login’ is closed to new replies.