How to change submit button value in comment from “Post Comment” to “Send”

Open comments.php file inside your theme’s folder <?php if ( comments_open() ) : ?> <?php $fields = array( ‘author’ => ‘<p class=”comment-form-author”>’ . ‘<label for=”author”>’ . __( ‘Name’, ‘responsive’ ) . ‘</label> ‘ . ( $req ? ‘<span class=”required”>*</span>’ : ” ) . ‘<input id=”author” name=”author” type=”text” value=”‘ . esc_attr( $commenter[‘comment_author’] ) . ‘” size=”30″ … Read more

Programmatically block commenting by restricting view of comment form

I wonder if you mean this kind of approach: add_filter( ‘init’, function() { $u = wp_get_current_user(); if( $u->exists() && in_array( ‘banned’, $u->roles, true ) ) add_filter( ‘comments_open’, ‘__return_false’ ); } ); where we check if the current user has the custom banned role. If that’s the case then we force all comments to be closed … Read more

Does WordPress Allow Blank/Empty Comment Submissions In WordPress?

Short answer: It doesn’t, but you can get around this: add_filter(‘comment_form_field_comment’, ‘my_comment_form_field_comment’); function my_comment_form_field_comment($default){ return false; } add_action(‘pre_comment_on_post’, ‘my_pre_comment_on_post’); function my_pre_comment_on_post($post_id){ $some_random_value = rand(0, 384534); $_POST[‘comment’] = “Default comment. Some random value to avoid duplicate comment warning: {$some_random_value}”; } If you want this only for certain pages, then you should create a custom page template, … Read more

Comments Reply Form

Ensure that you have Threaded Comments enabled: go to Dashboard -> Settings -> Discussion and enable the option to thread comments Ensure that your Theme enqueues the comment-reply script. Look for the following, usually in header.php, functions.php, etc.: <?php wp_enqueue_script( ‘comment-reply’ ); ?> Note: this call is usually wrapped in a conditional, such as: <?php … Read more