How to remove the site and e-mail fields from the WordPress comment form.

Home Forums Iconic One Pro Support How to remove the site and e-mail fields from the WordPress comment form.

This topic contains 3 replies, has 2 voices, and was last updated by  Themonic-Support 5 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5294

    Belluimag
    Participant

    Hello. I have a question. As in the comments on the WordPress in the Iconic One Pro theme, completely delete the site field, and the e-mail field?

    #5296

    Easiest way:

    Paste this custom CSS in live customizer Additional CSS section

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

    Also visit Settings > Discussion > Other Comment Settings to check if comments are allowed without providing email.

    Another way, removal from source code using a filter:

    Paste the following code in functions.php of Iconic One Pro at the bottom:

    
    function iop_custom_comment_form($fields) {
        if(isset($fields['email'])) unset($fields['email']);
    	if(isset($fields['url'])) unset($fields['url']);
        return $fields;
    }
    add_filter('comment_form_default_fields', 'iop_custom_comment_form');
    #5297

    Belluimag
    Participant

    Everything worked! Thank you. But I have one more question. How to change the name to an alias name? I want to change it so that the alias of the commentator is displayed, not the commenter’s name.

    #5298

    It will require custom work, charged extra, contact [email protected] with full requirements for quote.

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

You must be logged in to reply to this topic.