• Hello

    How can i remove website field from comment box? I want to do this so i can prevent spammers from spamming on my website. I’m using jetpack comment system. Also i’m using child theme for Hueman Theme.

    I have tried this code, but no luck.

    function alter_comment_form_fields($fields){
        $fields['url'] = '';  //removes website field
    
        return $fields;
    }
    
    add_filter('comment_form_default_fields','alter_comment_form_fields');

    Any ideas? Thanks in advance!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    Please refer to this issue.
    https://github.com/Automattic/jetpack/issues/477#issue-31802159

    Note the comment of jeherve ( One of the Jetpack plugin author )

    The Jetpack comment form is hosted on WordPress.com, and added to any Jetpack site via an iFrame.

    Which means the code is being loaded onto your site via an iframe.
    The code is hosted on WordPress.com, therefore, I think it’s not possible for you to modify it.

    You may want to post a question in Jetpack’s forum, if you require more detail. https://www.ads-software.com/support/plugin/jetpack

    Thank you

    Thread Starter thief_pl

    (@thief_pl)

    Ok, i have deactivated the comments from jetpack. Is there anyway i can remove the website field from the original website theme. I used the code above but the submit button looses margin and it’s reight below the author field.

    Thanks!

    Hi,

    Your PHP code works.
    You can add the following in your child theme style.css to move down the submit button.

    #commentform .submit {
        margin-top: 20px;
    }
    Thread Starter thief_pl

    (@thief_pl)

    Thanks for the help before i have found the solution to my problem.

    .themeform button[type=submit], .themeform input[type=submit] {
    	margin-top: 15px;
    	margin-bottom: 15px;
    }

    Hi,

    You are welcome.

    Please kindly mark the thread as resolve if you do not require further assistance.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to remove website field from comment.’ is closed to new replies.