Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Remove Required Comment Textarea (Repost)

Discussion in 'Misc WordPress Requests' started by WPAddiction, Jan 20, 2018.

  1. WPAddiction


    Reply To: Remove Required Comment Textarea (Repost), by WPAddiction

    Awesome, thanks for the help, I’m surprised that I missed that in the codex; guess I was too focused on removing the comment textarea altogether. Now the only problem I have is how to validate the URL. I thought I could use the input pattern below, but for some reason, it doesn’t appear to be working. If anyone has an idea why it isn’t working I would appreciate it.

    $comments_args = array(
    // redefine your own textarea (the comment body)
    'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Video URL', 'noun' ) . '</label><input type="url" id="comment" name="comment" placeholder="https://youtu.be/example" pattern="https?://.+" required aria-required="true"></input></p>',

    comment_form( $comments_args );

    Reply To: Remove Required Comment Textarea (Repost)

Share This Page

Monarch Social Sharing Plugin