Deleting users do not deletes coments
Deleting users do not deletes coments
Deleting users do not deletes coments
Any ideas anyone? Ive tried to run same array and foreach but for user_id => 1, to test. But all I get is a complete list with comments made by user with id 1. I want to display only the responses (from user id 1) below the current_user comments.
Pull & display new comments without refreshing the page
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.
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
Sorry, being stupid, i was using $comment_id, I needed $comment_ID. The wp_update_comment() function still didn’t work though, if anyone can shed some light onto that.
Comments appear in wrong posts
$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
How to allow special characters in comment name?
wp_insert_user email confirmation