Code to REMOVE website url from comment form

Community Forums Forums Design Tips and Tricks Code to REMOVE website url from comment form

This topic is: resolved

This topic contains 1 reply, has 2 voices, and was last updated by  media 1 year, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31989

    jpnyberg
    Participant
    Post count: 6

    I’m trying to figure out how to remove the website url field from the comment form.

    I use Genesis and a child theme.

    I found these 2 tips from “Genesis tutorials” websites, but it didn’t seem to work.  Any ideas?

    add_filter( ‘genesis_comment_form_args’, ‘wps_comment_form_args’ );
    /**
    * Remove website field from Comments Form
    *
    * @param array $args Comments form arguments.
    * @return array $args Modified Comments form arguments.
    */
    function wps_comment_form_args( $args ) {
    unset( $args[‘fields’][‘url’] );
    return $args;
    }

    OR CSS using this (it didn’t work either):

    comment-form-url {
    display: none;
    }

    #32779

    media
    Participant
    Post count: 3

    Hi jpnyberg,

    I had the same issue – the code snippet as above provided by Genesis did nothing. While I could hide the field with CSS, bots can still find it and submit spam.

    Found this which actually worked – http://www.wpkube.com/how-to-remove-the-website-field-from-the-comment-form/ – removed the website url field fine.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.