Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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