adding a text message beside the comment submit button

You should not edit the WordPress core files! If you have comment_id_fields() in your comments template, like this: <p class=”form-submit”> <input name=”submit” type=”submit” id=”<?php echo esc_attr( $args[‘id_submit’] ); ?>” value=”<?php echo esc_attr( $args[‘label_submit’] ); ?>” /> <?php comment_id_fields( $post_id ); ?> </p> you might use: add_filter(“comment_id_fields”,”my_submit_comment_message”); function my_submit_comment_message($result){ return $result.” <span>(your message will only be … Read more

Comment form vaildation

Ok, I’ve worked this out. You need to copy the complete first section of the `comment_form()’ from wp core. This is the code <?php function comment_form( $args = array(), $post_id = null ) { if ( null === $post_id ) $post_id = get_the_ID(); else $id = $post_id; $commenter = wp_get_current_commenter(); $user = wp_get_current_user(); $user_identity = … Read more

customize comment form

This code will allow you to customize the comment field labels and will move the comment form below the fields. Add the code to your functions.php or to a plugin. To change the labels, modify the Name CUSTOMIZED, Email CUSTOMIZED, and Website CUSTOMIZED, and Comment * CUSTOMIZED text. /** * Customize comment form default fields. … Read more

Making a Comment on a page without being on that page?

You have to set the value of $_POST[‘comment_post_ID’] to the post id of the page: <input type=”hidden” name=”comment_post_ID” value=”10″ /> Then set the action of the form element to /wp-comments-post.php, filter ‘comment_post_redirect’ and send the visitor back to page where the comment/review was written. Here is an example, written as plugin: <?php /* Plugin Name: … Read more

How to display the comment_form with a shortcode while removing it from its default position?

Version #1 The following seems to work for the Twenty Fifteen theme: /** * Display the comment form via shortcode on singular pages * Remove the default comment form. * Hide the unwanted “Comments are closed” message with CSS. * * @see http://wordpress.stackexchange.com/a/177289/26350 */ add_shortcode( ‘wpse_comment_form’, function( $atts = array(), $content=”” ) { if( is_singular() … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)