0

I'm using the New User Approve plugin.

After installing the plugin the top of the registration page says:

Welcome to XXX site. This site is accessible to approved users only. To be approved, you must first register.

How can I erase this message? I'm am using this code:

$message = apply_filters('login_message', '');

But the top says still stand there!

1 Answer 1

1

The second argument should be a function callback, not the actual message. You can remove the message completely by pasting this code into your theme's functions.php file:

add_filter( 'new_user_approve_welcome_message', 'wpse_76823_login_message' );

function wpse_76823_welcome_message( $message ) {
    return '';
}

Or, you can replace the message by using this code:

add_filter( 'new_user_approve_welcome_message', 'wpse_76823_login_message' );

function wpse_76823_welcome_message( $message ) {
    return "This is my new message";
}

If you need more help, post a comment below.

12
  • Thank you very much,I don't know the function like sonthing add_action,add_filter,Is there a toturial?
    – stevenlee
    Dec 21, 2012 at 6:27
  • Sorry, you provided the wrong filter hook. I've divulged the correct hook from the plugin code, see my updated answer
    – shea
    Dec 21, 2012 at 6:29
  • ok,I'm online now!
    – stevenlee
    Dec 21, 2012 at 7:13
  • Does my answer work for you?
    – shea
    Dec 21, 2012 at 7:18
  • Yes,It works! I suppose to have something else good ...
    – stevenlee
    Dec 21, 2012 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.