I have also had difficulty with this.
I tried to unset the url field from the $fields array, and it doesn’t work.
I even tried to edit the comments.php file, entering my own fields array:
comment_form(
array(
'must_log_in' => '<p class="must-log-in">'. sprintf( esc_html__( 'You must be %1$slogged in%2$s to post a comment.', 'oceanwp' ), '<a href="'. wp_login_url( apply_filters( 'the_permalink', get_permalink() ) ) .'">', '</a>' ) .'</p>',
'logged_in_as' => '<p class="logged-in-as">'. esc_html__( 'Logged in as', 'oceanwp' ) .' <a href="'. admin_url( 'profile.php' ) .'">'. $user_identity .'</a>. <a href="' . wp_logout_url( get_permalink() ) .'" title="'. esc_html__( 'Log out of this account', 'oceanwp' ) .'">'. esc_html__( 'Log out', 'oceanwp' ) .'</a></p>',
'comment_notes_before' => false,
'comment_notes_after' => false,
'comment_field' => '<div class="comment-textarea"><textarea name="comment" id="comment" cols="39" rows="4" tabindex="100" class="textarea-comment" placeholder="'. esc_html__( 'Your Comment Here...', 'oceanwp' ) .'"></textarea></div>',
'id_submit' => 'comment-submit',
'label_submit' => esc_html__( 'Post Comment', 'oceanwp' ),
'fields' => apply_filters( 'comment_form_default_fields', array(
'author' =>
'<p class="comment-form-author">' .
'<label for="author">' . __( 'Name', 'domainreference' ) . '</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', 'domainreference' ) . '</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' => ''
) //fields array
) //apply_filters
)//comment form args array
); //comments form function brackets
As you can see, I have set the 'url'
field as empty. It still shows up “normally” in the comment form.
Any news on this by any chance?
-
This reply was modified 6 years, 8 months ago by
udidol.