WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to display the registered members count for today in BuddyPress. Something like:

20 new members registered today

I have no clue where to start, so I cannot provide any code yet :(

share|improve this question

closed as off-topic by toscho Jul 31 '14 at 19:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted
function bp_registrations_today($activated = false) {
    global $wpdb;

    $query = "SELECT COUNT(ID) FROM {$wpdb->prefix}users WHERE DATE(user_registered) = CURDATE()";

    if ( $activated ) {
        $query .= " AND user_status = 0";

    return $wpdb->get_var($query);

To get the number of users registered today, call the function as

echo bp_registrations_today();

To get the number of users registered today with activated accounts, call the function as

echo bp_registrations_today(true);
share|improve this answer
Thank You Chittaranjan, will check it out tonight and will write here the result !! – Daniel Foltynek Nov 29 '13 at 18:49
It is working perfectly Chittaranjan !! Thank you very much – Daniel Foltynek Nov 29 '13 at 19:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.