Adjustments to the input form for the comment

Viewing 2 posts - 1 through 2 (of 2 total)
  • #19296
    p_rost
    Participant

    Hello,

    I use the theme “Pinboard” and have a question.
    In the input form for the comment:
    How can I change the text “Leave a Reply” and how can I remove the input field for the URL ?

    Thanks in advance

    Best Regards

    P_Rost

    #19301
    Daniel Tara
    Keymaster

    Use this code to change the comment form title:

    add_filter( 'comment_form_defaults', 'pinboard_replace_comment_form_title' );
    
    function pinboard_replace_comment_form_title( $defaults ) {
    	$defaults['title_reply'] = "What's on your mind?";
    	return $defaults;
    }

    And this to remove the URL field:

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

    Code should be added to your child theme’s functions.php file.

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

You must be logged in to reply to this topic.