User’s Comments Number: Storing it in a meta field for different uses

I am using this within a plugin, but it can be used within your theme’s function file. // Create field to track users’ comments numbers function display_educadme_user_comments_number($user_id) { if( is_user_logged_in() ) { global $wpdb; $user_comments_number = $wpdb->get_var(‘SELECT COUNT(comment_ID) FROM ‘ . $wpdb->comments. ‘ WHERE comment_author_email = “‘ . get_comment_author_email() . ‘”‘); ?> <h3><?php _e(‘Participation in … Read more

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