Change “Register For This Site” message on WordPress registration page

This is a handy code snippet, which allows you to change the default “Register for this site” text that appears on WordPress registration page, with your own custom text.

Change Register For This Site Message To Your Own Custom Text on WordPress registration page

Change Register For This Site Message To Your Own Custom Text on WordPress registration page

All you need to do is copy the following code and paste it inside your functions.php file

//Change "Register For This Site" text
function change_register_page_msg($message)
{
	if(strpos($message,"Register For This Site") == true)
	{
		$message = '<p class="message">Your custom message!</p>';
	}
 
	return $message;
}
add_filter('login_message','change_register_page_msg');

To remove the message from registration page use the following code,

//Remove "Register For This Site" text
function change_register_page_msg($message)
{
	if(strpos($message,"Register For This Site") == true)
	{
		$message = '';
	}
 
	return $message;
}
add_filter('login_message','change_register_page_msg');

Useful Read: How to Add a Login/Logout Link to WordPress Menus

0 Comments

Leave a Comment.