How to display a custom message on WordPress registration page

First, update the code below with your message on line 6. Then, paste it into your functions.php file. You’re done! Just remove the code to remove the message if needed.

add_action('register_form', 'register_message');
function register_message() {
    $html = '
        <div style="margin:10px 0;border:1px solid #e5e5e5;padding:10px">
            <p style="margin:5px 0;">
            Joining this site you agree to the following terms. Do no harm!
            </p>
        </div>';
    echo $html;
}

Thanks to Kevin Chard for the code!

Leave a Reply

Your email address will not be published. Required fields are marked *