Topic Tags: Compatibility


Theme My Login is using a custom SQL query to get the ID of the login page. It is expecting only one result, but with WPML enabled it is getting back as many results as languages are enabled.

The problem is that when you try to access the Dashboard, you get redirected to a login page in a random language.


As a workaround, you can use tml_page_id filter for translating the page ID to the currently selected language, like this:

add_filter( 'tml_page_id', 'tml_translate_page_id' );
function tml_translate_page_id( $id ) {
	return apply_filters( 'wpml_object_id', $id, 'page', true );

6 Responses to “Theme My Login redirects to login page in the wrong language”

  1. Hello, thank you for your post.
    I used tml_page_id filter but this has worked for just 3 hours.
    If you have any advise more, please let me know.

Leave a Reply

Please leave here comments about this page only.
For technical support and feature suggestions, head to our forum. We are waiting there!

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>