Created
February 6, 2019 01:52
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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