It’s fairly easy to get the comment count for a particular user.
$args = array(
'user_id' => bp_loggedin_user_id(),
'count' => true
);
$count = get_comments( $args );
From that point on, depending on what action the user is taking on your site, you can check the count against a pre-determined figure:
if ( $count < 10 ) {
// The comment count for the logged in user is less than 10.
} else {
// The comment count for the logged in user is 10 or more.
}
It isn’t really a copy-and-paste example. You’ll need to be comfortable with PHP and WordPress 🙁
Alternatively though, you could look for a plugin in the Plugin Directory. Maybe the functionality you need already exists?
Hellbounds
@hellbounds
8 years, 8 months ago
How to limit MESAGE NUMBER for all user.
I need this becouse i have site abonament and i need limit this.