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.

No supporters are available to work today on this forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 8 replies, has 6 voices.

Last updated by Andrei I. 8 years, 4 months ago.

Assigned support staff: Harshad.

Author Posts
June 4, 2013 at 1:22 pm #132793

Karel

Hi,

I use the theme-my-login plugin in my site, but it does not work properly with non-English languages. The register functionality redirects to non-existent pages.

So, the question is: Is theme-my-login supported by WPML, and if not, can you suggest any other free plugin with the same functionality?

Thank you

June 4, 2013 at 1:59 pm #132815

Harshad

Dear Karel,

Sorry I'm not aware of any other plugin similar to theme-my-login.
we have a program here
http://wpml.org/documentation/theme-compatibility/go-global-program/

Where we work with plugin authors to work out the compatibility issues.
Would you like to interest you plugin author in it?

We are ready to join forces with him and work together to solve this compatibility problem.

Please contact the author and ask him if he is ready to work with us. If he do, please provide us with his contact details and we will do the rest.

Thank you

July 3, 2013 at 8:25 am #141106

Karel

Thanks for the reply.
The author does not wish to participate in the go global program. I had to make some hardcoded changes to the plugin in order to work correctly.

Thanks

July 6, 2013 at 3:40 pm #142134

Meg

Hi Karel,

I'm working on this issue too and resigned to modifying the TML files to force compatibility. Would you be willing to share your fix? Tried this with some modifications as am using directories rather than language params, but no joy so far <a href="hidden link">hidden link;

Thanks in advance for your help.

July 6, 2013 at 6:55 pm #142137

Meg

Got this working like so:

Modified custom-redirection.php

				// Send 'em to the specified URL
				if (ICL_LANGUAGE_CODE == 'en') {
					$redirect_to = $redirection['login_url'];
				} elseif (ICL_LANGUAGE_CODE == 'cy') {
					$redirect_to = $redirection['login_url'] . '/cy/';
				}

Enabled custom redirection in TML > General.

Updated permalinks in Settings > General.

Will be annoying to maintain with updates, but no better solution at this time that I can see.

February 1, 2014 at 12:52 am #331476

victorY

Hi Meg,

I am using directories as well and I added the above code to my custom-redirection.php.

Will you let me know what you updated the custom redirection and the permalinks to?

Thank you.

February 1, 2014 at 1:59 pm #331590

Meg

Hi victorY,

There are 2 steps.

Go to your WordPress Dashboard then:
1) Go to TML > General and tick Enable Custom Redirection. Save your changes.
2) Go to Settings > Permalinks and just click Save Changes (you don't need to make any alterations, just click save to refresh them).

August 20, 2015 at 6:12 pm #683586

Tim

I realize this is old, but there is a filter for the Theme my login action links.

See /theme-my-login/includes/class-theme-my-login-template.php line 316.

return apply_filters( 'tml_action_links', $action_links, $args );

And you can add a filter to that like this:

add_filter('tml_action_links','my_custom_tml_action_links_filter');
function my_custom_tml_action_links_filter ( $action_links, $args ) 
{
    // do stuff; 
    return $action_links; 
}
November 6, 2015 at 12:06 am #740973

Andrei I.

Found this thread while looking for the answer and then found the answer mysefl. I will add the solution here in case anybody else needs it.

The Theme My Login plugin provides filters to change the action links, action urls and redirect urls as needed. There is a full list at the official theme my login site.

Together with the global ICL_LANGUAGE_CODE variable, they can be used to check the language of the current page and redirect as needed.

Here's an example that redirects the user to the French version of the login page, from the French version of the Lost Password page (once the user enters their email to get a new password).

//CHANGE REDIRECT TO LOGIN PAGE BASED ON LANGUAGE - LOST PASSWORD
add_filter('tml_redirect_url', 'my_tml_redirect_lostpassword', 10, 2);
function my_tml_redirect_lostpassword($url, $action){
	if ( 'lostpassword' == $action ){
		if(ICL_LANGUAGE_CODE=='fr'){
			$login_url = site_url('/fr/connexion/', 'https');
		}
		else
		{
			$login_url = site_url('/login/', 'https');
		}
		 //add query arg for checkemail
		$login_url = add_query_arg(array('checkemail' => 'confirm'), $login_url);
	}
	return $login_url ;

}

You may add the code above to functions.php of your theme. Like this, no plugin files need to be modified directly.