WordPress.org

Ready to get started?Download WordPress

Forums

Deleting Email and URL box (4 posts)

  1. munyez33
    Member
    Posted 1 week ago #

    Hey guys,
    I want to remove "Your Email" and "Your URL" lines for commenting on the posts for my website (thoughts-and-quotes.com)
    Any ideas what is the code to add in CSS editor?

    I have already tried searching for the code in comments.php, found nothing
    + I have tried to unclick the option in the settings but that didn't help either

  2. Kori Ashton
    Member
    Posted 1 week ago #

    You can do this with a display: none; command inside of your CSS or better yet childtheme's css file.

  3. munyez33
    Member
    Posted 1 week ago #

    i have used this code which worked great for URL line:

    add_filter('comment_form_default_fields', 'url_filtered');
    function url_filtered($fields)
    {
    if(isset($fields['url']))
    unset($fields['url']);
    return $fields;
    }

    but im still not sure about email part

  4. tasko
    Member
    Posted 1 week ago #

    Try to add this filter:
    add_filter('comment_form_field_email', '__return_false');

Reply

You must log in to post.

About this Topic

Tags