Remove URL Field on Wordpress Comments Sections

 

  1. Log in to WordPress blog
  2. Go to Dashboard
  3. Click on the Appearance tab from the left pane.
  4. Click on Edit under the Appearance tab.
  5. Select theme to be edited from the drop-down at right upper corner.
  6. Click on functions.php from the right pane.
  7. Copy and paste the below code at the bottom of all others and click on Submit/ Save.

Below the filter code that needs to be added in functions.php file:

add_filter('comment_form_default_fields', 'remove_url');

 function remove_url($fields)

 {

 if(isset($fields['url']))

 unset($fields['url']);

 return $fields;

 }

Once this code is added, clear your cache plugin and refresh the article or blog post page. There will be no website URL field in the comment form.

Comments

Popular posts from this blog

ERR: error parsing query: found influx, expected SELECT, DELETE, SHOW, CREATE, DROP, EXPLAIN, GRANT, REVOKE, ALTER, SET, KILL at line

How To Convert Html File/URL/String Into Image Using Python

How to get Full URL or get absolute url In Django