WordPress.org

Ready to get started?Download WordPress

Forums

Theme My Login
[resolved] Change 'Log In' to 'Member Login' (7 posts)

  1. inprojectcloud
    Member
    Posted 2 years ago #

    Hey!

    I've been trying to the change the widget title for the plugin. Unfortunately, everytime I think I've changed the right file, I get an error somewhere else.

    Could you please guide me on how I can change it?

    http://wordpress.org/extend/plugins/theme-my-login/

  2. Jeff Farthing
    Member
    Plugin Author

    Posted 2 years ago #

    Modify/create wp-content/plugins/theme-my-login-custom.php and add the following:

    function tml_title_filter( $title, $action ) {
    	if ( 'login' == $action )
    		$title = 'Member Login';
    	return $title;
    }
    add_filter( 'tml_title', 'tml_title_filter', 20, 2 );
  3. inprojectcloud
    Member
    Posted 2 years ago #

    Hi,

    It didn't work for me. Here is what happened:

    1. I created the file in the plugin directory so that it does not get erased when I upgrade the plugin.

    2. Both on the frontend and backend, I see - "function tml_title_filter( $title, $action ) { if ( 'login' == $action ) $title = 'MAKE AN ANNOUNCEMENT FOR FREE'; return $title; } add_filter( 'tml_title', 'tml_title_filter', 20, 2 ); " on the top.

    I've removed the file from the plugin directory now.

    I'm using the latest version origin theme and wordpress.

  4. Jeff Farthing
    Member
    Plugin Author

    Posted 2 years ago #

    You need to add an opening PHP tag to the file:

    <?php
    
    function tml_title_filter( $title, $action ) {
    	if ( 'login' == $action )
    		$title = 'Member Login';
    	return $title;
    }
    add_filter( 'tml_title', 'tml_title_filter', 20, 2 );
  5. inprojectcloud
    Member
    Posted 2 years ago #

    Hey!

    Thanks! This does the trick. Unfortunately, it changes the welcome message also. It's now a static message.

    http://projectcloud.info/

  6. Jeff Farthing
    Member
    Plugin Author

    Posted 2 years ago #

    <?php
    
    function tml_title_filter( $title, $action ) {
    	if ( 'login' == $action && ! is_user_logged_in() )
    		$title = 'Member Login';
    	return $title;
    }
    add_filter( 'tml_title', 'tml_title_filter', 20, 2 );
  7. Cristiano
    Member
    Posted 2 years ago #

    It works fine when you are at the principal page... but if you click en "forgot password", for exemple, the new $title appears out of the box...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic