Archived topic
How to Delete Website Link in the Comment Section
9 replies · Started by Maggie on September 29, 2021
Hi team, I want to delete link in the comment section.
See below image. 
Example link: ofwmoney.org/start-blog/
Thanks.
Hi Maggie,
Try this solution:
https://docs.generatepress.com/article/remove-e-mail-and-url-field-from-comment-form/
If you only want to remove the Website, the PHP snippet would be:
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;
}
Adding PHP: https://docs.generatepress.com/article/adding-php/
Let me know if you need further assistance :)
Is adding PHP snippet is in the cPanel, please guide me to do this.
hi Maggie,
You'll need a child theme's functions.php or a Code snippets plugin - https://wordpress.org/plugins/code-snippets/
I already added in the child themes's functions.php

But its not working.
Hi there,
thats no the Child Theme, that is the parent GeneratePress theme. Do you have a child theme installed and activated ?
I think I do not have, Where do i get the Child theme?
You can download one here - https://docs.generatepress.com/article/using-child-theme/
You can install it like how you install a theme. You can activate it over GeneratePress parent theme.
Hi guys, its working. Thanks a lot.
Nice one. No problem. Glad its working for you now. :D