I want to fill the comment with the comment count?

I think the reason for your header already sent error is that you are using comments_number() that will echo the value. Try instead get_comments_number( $post_id ); to return it. The Codex info on this function says that it returns the total number of comments, trackbacks, and pingbacks for the post.

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

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

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