Site logo

Archived topic

How to Delete Website Link in the Comment Section

9 replies · Started by Maggie on September 29, 2021

Viewing posts 1–10 of 10

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.

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?

Hi guys, its working. Thanks a lot.

Nice one. No problem. Glad its working for you now. :D

This archived topic is closed to new replies.