• Resolved SteveW928

    (@stevew928)


    Hi Jeff… thanks for this plugin!

    I’m wondering where the best place might be to change the ‘Register for this Site’ text in the yellow box on the Registration page. The client would like ‘Register for this Course’.

    I have found the text in class-theme-my-login-template.php, but changing that will be wiped out each plugin update. I tried putting a copy in my theme directory, but unless I’m dealing with a caching issue, it doesn’t seem to look there for this file.

    Is there a better way to change this text? Or, should I just make a note to update that each time that plugin gets updated (a bit of a hassle).

    Thanks!

    https://www.ads-software.com/plugins/theme-my-login/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    Put the following in wp-content/plugins/theme-my-login-custom.php.

    function tml_action_template_message( $message, $action ) {
    
    	if ( 'register' == $action )
    		$message = 'Register for this Course';
    
    	return $message;
    }
    add_filter( 'tml_action_template_message', 'tml_register_message', 10, 2 );

    Only way I could get this code to work was by putting it in my child theme function.php file. However, all this does is delete any text above the registration form.

    https://www.brockwellswimmers.com/register/

    Any ideas where I might be going wrong?

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Yea, the code I posted is actually wrong. Try the following instead.

    function tml_action_template_message( $message, $action ) {
    
    	if ( 'register' == $action )
    		$message = 'Register for this Course';
    
    	return $message;
    }
    add_filter( 'tml_action_template_message', 'tml_action_template_message', 10, 2 );

    Now works a treat. Thanks very much for your help. Donation made.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Best way to change registration 'box' text "Register for this Site"’ is closed to new replies.