Close sidebar

Best Way to Remove Website URL Field from WordPress Comment Form

Best Way to Remove Website URL Field from WordPress Comment Form

Every WordPress website has a comment form to get feedback on the article.Visitors can provide their origin.Visitors Use their email or website URL to comment . There are some websites that offer comments through website registration .

However, the misconception is that many people generate backlinks by providing URLs in the comment box.As a result, your comment box often becomes spam .As a result, the website owner wants to remove the URL from the comments box .

You can easily remove the URL from the comments box of your website if you want. But many times there are many of us who have not been able to do that . But it is very important for us to remove the URL / so for those who do not know how to remove the URL from the comments box of the website, today’s blog post is only for them .
With our WordPress website you can remove the URL from the comments box.

So let’s see how you can remove the URL from your WordPress website without delay.

 

In the WordPress Dashboard, go to Appearance > Theme Editor and then open the functions.php file and add this code from below .

 

function.php file location

 

Option #1:

 add_filter('comment_form_field_url', '__return_false'); 

Option #2:

 remove_filter('comment_text', 'make_clickable', 9); 

Option #3:

function wpd_remove_comment_website_field( $fields ) {
    unset( $fields['url'] );
    
    return $fields;
}
add_filter( 'comment_form_default_fields', 'wpd_remove_comment_website_field', 99 );

Option #4:

add_action( 'after_setup_theme', 'tu_add_comment_url_filter' );
 function tu_add_comment_url_filter() {
     add_filter( 'comment_form_default_fields', 'tu_disable_comment_url', 20 );
 }

function tu_disable_comment_url($fields) {
     unset($fields['url']);
     return $fields;
 }

Option #5:
if you using astra pro theme this option for you

function wpd_remove_comment_website_field( $fields ) {
    unset( $fields['url'] );
    
    return $fields;
}
add_filter( 'astra_comment_form_default_fields_markup', 'wpd_remove_comment_website_field', 99 );

Option #6:

$url = '<wp-p class="comment-form-url">' .
'<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" tabindex="3" />' .
'<label for="url">' . __( 'Website', 'genesis' ) . '</label>' .
'</wp-p>';

Option #7:

.comment-form-url {
    display: none;
}

 

Most common question about this problem

How do I remove the URL field from WordPress comment form?

 add_filter('comment_form_field_url', '__return_false'); 

How can you disable the WordPress comment?

.comment-form-url {
    display: none;
}

Hopefully you can solve your problem by using any one of the methods shown to us. If you want to remove the URL from the comments box of your wordpress website, follow the procedure shown to us. Thank you

Check Robi SIM Number Previous post How To Check Robi Number
The Best Gluten Free Pizza In Toronto Next post The Best Gluten Free Pizza In Toronto

Leave a Reply

Your email address will not be published. Required fields are marked *

Close