Removing Website from Comments

Community Forums Forums Design Tips and Tricks Removing Website from Comments

This topic is: not resolved

This topic contains 5 replies, has 3 voices, and was last updated by  braddalton 2 years, 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #17413


    Is there a way of removing the website field when someone is leaving a comment?




    I have found a solution with this code added to the functions.php file.


    add_filter( ‘genesis_comment_form_args’, ‘url_filtered’ );
    add_filter( ‘comment_form_default_fields’, ‘url_filtered’ );
    function url_filtered( $fields ) {

    if ( isset( $fields[‘url’] ) )
    unset( $fields[‘url’] );

    if ( isset( $fields[‘fields’][‘url’] ) )
    unset( $fields[‘fields’][‘url’] );

    return $fields;



    I read that there is a way to do it from the CSS but I can’t make it work :S
    What you have to write in the stylesheet is:

    .comment-form-url {display: none;}

    Anyone who get it work?




    Perfect, working like a charm! Thanks a lot. My question is, adding code to the functions.php don’t make the site run slower than adding some modifications (when possible) to the CSS?



    In my opnion, It depends on what the code does and how effecient it is.

    No doubt poor coding can slow down a site.

    Moved a site to Genesis recently and recoded it reducing the database from over 30 mg to 3 mg and it loads 5 times faster.

    Another example of this is PHP and CSS coding best practices.

    Someone contacted me recently about thier site which takes 8 seconds to load and contains only 120 posts hosted on good managed servers. The problem is they have hacked the core WordPres files, the parent themes files and many of the plugin files and cannot update without a major recoding effort.

    When you use Genesis, you’re always advised to use a child theme for custom coding rather than modify the parent themes template files. This way you can painlessly update the parent theme which is becoming more and more effecient.

    My own sites home page loads in about a second which wasn’t the case when using another theme but the server configuration and other factors can also make a huge difference.

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

You must be logged in to reply to this topic.