Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How To How to Remove URL / Website Field from WordPress Comment Form
#1
[Image: Remove-URL-Website-Field-from-Word-Press...rm-png.png]
Engagement is extremely important for any website. In order to set up proper engagement, a direct line of communication should be fostered with care. One way for it is comment form.
WordPress comes with a built-in comment system that allows for community interaction around your content. Anyone with a valid Name and Email can leave a comment without verifying their identity.

WordPress comment form comes with three fields (name, email, and website or URL). When displaying the comments, WordPress automatically hyperlinks the name of the commenter with the website URL they provided.
It is true that WordPress websites attract a lot of spammers as most of them know how easy it is to build backlinks off from them. Most bloggers do not know how to control spam and they do not have the time to moderate each comment.
Some blackhat SEO guys misuse it and spam your site. And you may be finding the ways to stop spam on your website. One of the ways includes removing the URL/Website field from comment form is always beneficial.
If you are a constant target of comment link spam and you have very little time to moderate the comments, then removing the website field entirely will seriously discourage the link spammers.
In this guide, I will tell you two easy ways to remove the URL/website field from the WordPress website.
1. Using comment.php:
  • Go to your theme’s 
    comments.php

  • [size=undefined]
     file.[/size]

  • [size=undefined]Just remove ‘url’ => field from the code.[/size]
[*]Here is the sample code that you have to remove:
$url = '

' .
'' .
'' .
'

';

Note: Every theme has different code. So make sure you are removing it accordingly. The above code snippet is from the Genesis framework.
2. Using Function.php:
Add below code to theme’s 

Code:
functions.php

[*]
[size=undefined]
file.[/size]

// Remove URL/Website field in Comment form
add_filter('comment_form_default_fields','infophilic_remove_comment_url');
function infophilic_remove_comment_url($fields) {
unset($fields['url']);
return $fields;
}

The code above creates a function called 

Code:
website_remove()

[*]
[size=undefined]
 and removes (or unsets) the URL field.[/size]

Using the Hook 

Code:
add_filter()

[*]
[size=undefined]
, we pass the argument to default WordPress function [/size]


Code:
comment_form_default_fields

[*]
[size=undefined]
 that contain fields of the comment form.[/size]

Hope you find the article helpful
To Purchase Credit Click here , For how to make money on Sologet forum Click here 

HIRE ME FOR WEBSITE DESIGNING USE THE PM BUTTON TO SEND ME MESSAGE

There is love in sharing
  


Messages In This Thread
How to Remove URL / Website Field from WordPress Comment Form - by Kingsolomon - 06-24-2019, 12:13 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  HOW TO How To Hide A Specific Category From Showing Inside Post Kingsolomon 0 9 1 hour ago
Last Post: Kingsolomon
  HOW TO How to Create Backup and Restore Your WordPress Website Zenmarc 0 52 09-16-2019, 04:18 PM
Last Post: Zenmarc
  MUST READ List of Best WordPress Themes Zenmarc 0 141 08-26-2019, 02:06 PM
Last Post: Zenmarc
  How To Show WordPress Post View Count Without A Plugin Kingsolomon 4 987 04-28-2019, 06:20 AM
Last Post: Kingsolomon
  Problems with seekhype theme Frizzy 0 330 04-02-2019, 12:12 PM
Last Post: Frizzy

Forum Jump:


Users browsing this thread:
1 Guest(s)

How to Remove URL / Website Field from WordPress Comment Form00