Show ‘add comment’ link for status updates in Twenty Thirteen

Open up the /wp-content/themes/twentythirteen/functions.php file and change the line $format_prefix = ( has_post_format( ‘chat’ ) || has_post_format( ‘status’ ) ) ? _x( ‘%1$s on %2$s’, ‘1: post format name. 2: date’, ‘twentythirteen’ ): ‘%2$s’; to $format_prefix = ( has_post_format( ‘chat’ ) || has_post_format( ‘status’ ) ) ? _x( ‘%1$s on %2$s – show/leave comments’, ‘1: … Read more

Display only posts with comments

Since you are in a loop you can use the function get_comments_number(). Retrieves the value of the total number of comments, Trackbacks, and Pingbacks for a post. This tag must be within The Loop. Unlike comments_number() this function will return the value as a numeric value. Use it for example as follows: $num_comments = get_comments_number(); … Read more

Media upload in add comment meta box

You could start with this : add_action( ‘comment_form_logged_in_after’, ‘wpse_102612_additional_fields’ );// only for logged users function wpse_102612_additional_fields () { echo ‘<p class=”comment-form-upload”>’. ‘<label for=”upload”>’ . __( ‘Upload your file’ ) . ‘</label>’. ‘<input id=”upload” name=”upload” type=”file” size=”30″ /></p>’; }

Required Field for Comment parent only?

$comment is not set inside that function. Look into variable scope. $_POST[‘comment_parent’] should be set though. function custom_validate_comment() { //validate rating if( isset($_POST[‘comment_parent’]) && $_POST[‘comment_parent’] === 0) { if( empty( $_POST[‘rating’]) ) wp_die( __(‘Error: Please Include Your Rating (0 to 5 Stars)’) ); } } add_action(‘pre_comment_on_post’, ‘custom_validate_comment’); You could also rewrite your function to take … Read more