• Resolved ron regev

    (@ron-regev)


    hello,

    how can i remove title, website and email fields from “leave a reply”?
    i want only conent(text area)…
    thank you ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • Sunny Johal

    (@sunny_johal)

    Hi Ron,
    You need to create a function that hooks into the ‘comment_form_default_fields’ filter in your functions.php file. So for your example you would do something like this:

    function custom_remove_form_default_fields( $fields ) {
        // Unset title, website and email fields
        unset( $fields['author'] );
        unset( $fields['email'] );
        unset( $fields['url'] );
    
        return $fields;
    }
    add_filter( 'comment_form_default_fields', 'custom_remove_form_default_fields' );

    Hope that helps!

    Sunny

    WPyogi

    (@wpyogi)

    Changes like this should generally be made in a child theme so that they are not lost when the theme is updated.

    Thread Starter ron regev

    (@ron-regev)

    thank you!!!!!! a lot!!

    Sunny Johal

    (@sunny_johal)

    My Pleasure Ron, please mark this post as resolved if you have solved your issue.

    Sunny

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to remove title, website and email fields from "leave a reply"?’ is closed to new replies.