Skip to content

Instantly share code, notes, and snippets.

@billerickson
Last active June 4, 2019 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/cd94d4b2c8669e1d7eddf7dc34cb99bf to your computer and use it in GitHub Desktop.
Save billerickson/cd94d4b2c8669e1d7eddf7dc34cb99bf to your computer and use it in GitHub Desktop.
<?php
/**
* Remove URL field from comment form
*
*/
function be_remove_url_from_comment_form( $fields ) {
unset($fields['url']);
return $fields;
}
add_filter( 'comment_form_default_fields', 'be_remove_url_from_comment_form' );
/**
* Remove URL from existing comments
*
*/
function be_remove_url_from_existing_comments( $author_link, $author ) {
return $author;
}
add_filter( 'get_comment_author_link', 'be_remove_url_from_existing_comments', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment