[Resolved] Remove comment URL field

Home Forums Support Remove comment URL field

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1191546
    Kaleem

    Hello, I have tried many tricks, including this https://docs.generatepress.com/article/remove-e-mail-and-url-field-from-comment-form/ to remove the URL field in the comment but still, nothing happens.

    Please any help to do this?
    Thanks in advance.

    #1191566
    Suraj Katwal

    Install Code Snippets Plugin

    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;
    }

    Use this code and Hit Activate button.

    Thank you

    SEO, WordPress Optimization, Blogging Tutorials.
    GeneratePress Tutorial: https://www.wplogout.com

    #1191714
    David
    Staff
    Customer Support

    Hi there,

    if you can add the code, and make sure to uncheck the requirement box and the clear any caches.
    If the issue persists, try creating a new post with comments to see if it has been applied.

    Let us know.

    #1193336
    Kaleem

    @Suraj, your solution rather worked for me.
    Thank you all for your help.

    #1193357
    Suraj Katwal

    Welcome 🙂

    SEO, WordPress Optimization, Blogging Tutorials.
    GeneratePress Tutorial: https://www.wplogout.com

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.