• Hello Everyone. I was wondering if I could set wordpress up to require a name field when replying to a post. I know there is an option to have name AND email address, but I only wish to have name. Is that possible?
    Thanks in advance.
    Regards ~ Neczy

Viewing 4 replies - 1 through 4 (of 4 total)
  • Think it is, but I’ve not done it.
    It would need the editing of ‘wp-comments-post.php’ and the removal (probably) of lines 22,23,24, then taking the email bit out of line 38.

    Thread Starter Anonymous

    Ah yes, that did it. I removed lines 22, 23, 24 and then on line 38 changed it too:
    if ( get_settings('require_name_email') && ('' == $author || '' == $author) )
    I’m not sure if thats totally “proper” but it worked! Thanks podz, you are very helpful on the forums!

    Wow – it worked !! Excellent ??

    If you do that though, won’t you not be able to keep the email if someone does enter one, why don’t you just do something like this:

    if ($author == '')
    die( __('Error: please fill the required fields (name).') );

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Name Required in Comments?’ is closed to new replies.