I' would like to remove the "site"-inputfield in the comment form in Wordpress twenty eleven. Someone who knows the answer? Thanks in advance.

link|improve this question
feedback

2 Answers

To remove any field you should pass the $args of which fields you want to be showed in your form.

Exemple:

<?php
    $args = array(
        'fields' =>array(
            'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) . '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',
            'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) . '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',
            // 'url' => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label>' . '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',
        ); 
    );
    comment_form($args);

You just have to comment the line of the Website, and pass the array like in the exemple.

If you want further reading on how to customize your form with the function comment_form(); you should read this Codex page

link|improve this answer
feedback

you can try adding this filter to your theme's functions.php:

add_filter('comment_form_default_fields', 'remove_url');
function remove_url($val) {
    $val['url'] = '';
    return $val;    
}
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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