WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How do you REALLY remove the URL field from comments? (2 posts)

  1. keeperbay
    Member
    Posted 1 year ago #

    How do you REALLY remove the URL field from comments?

    Because this doesn't work:

    function disable_comment_url($fields)
    {
        //print_r($fields); //uncomment this to see the default value of $fields
         unset($fields['url']);
         return $fields;
    }
    add_filter('comment_form_default_fields','disable_comment_url');

    And this doesn't work:
    function remove_url_from_comments($fields)
    {
    unset($fields['url']);
    return $fields;
    }
    add_filter('comment_form_default_fields','remove_url_from_comments');

  2. keeperbay
    Member
    Posted 1 year ago #

    And as usual, after HOURS of searching and finally getting frustrated enough to post a comment, I figured it out.

    Go into the themes: comments.php
    And comment out the lines below as shown.

    <!--	<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="40" tabindex="3" />
    					<label for="url"><?php _e("Website", "solostream"); ?></label></p> -->

Topic Closed

This topic has been closed to new replies.

About this Topic