Skip to content

Instantly share code, notes, and snippets.

@hmbashar
Created February 6, 2019 01:52
Show Gist options
  • Save hmbashar/8a43d42102381df1fec9840032755a3e to your computer and use it in GitHub Desktop.
Save hmbashar/8a43d42102381df1fec9840032755a3e to your computer and use it in GitHub Desktop.
Change WordPress’ Default “Register For This Site” Message To Your Own Custom Text
function change_reg_message($message)
{
// change messages that contain 'Register'
if (strpos($message, 'Register') !== FALSE) {
$newMessage = "Hello! We're so excited to have you as a member! Just enter a username and your email, and we'll have you squared away in no time.";
return '<p class="message register">' . $newMessage . '</p>';
}
else {
return $message;
}
}
// add our new function to the login_message hook
add_action('login_message', 'change_reg_message');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment