Leo
(@leohsiang)
Hi there,
Try this snippet:
add_filter('comment_form_default_fields','generate_disable_comment_url');
function generate_disable_comment_url($fields) {
unset($fields['url']);
return $fields;
}
Adding PHP: https://docs.generatepress.com/article/adding-php/
Let me know 🙂
hi,
i pasted it in functions.php but no luck, still appears…
Theme Author
Tom
(@edge22)
Hi there,
Which method did you use to add the code?
If you used Code Snippets, you may need to do this instead:
add_action( 'after_setup_theme', 'tu_add_comment_fields_filter' );
function tu_add_comment_fields_filter() {
add_filter( 'comment_form_default_fields', 'tu_disable_comment_url' );
}
function tu_disable_comment_url( $fields ) {
unset( $fields['url'] );
return $fields;
}