Display count of new members registered today [closed]

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 … Read more

WordPress before save / update member

you can use something like this /** * Get City state from zipcode */ function rtp_get_city_state($location) { $details_url=”http://maps.google.com/maps/api/geocode/json?address=”.$location.’&sensor=false’; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $details_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = json_decode(curl_exec($ch), true); if ($response[‘status’] != ‘OK’) { return null; } print_r($response); }

IF user is logged in only show certain page

Big Question. So, first, to keep the galleries separate, it would be good to give them their own custom post type. We’ll be checking for this later… <?php add_action( ‘init’, ‘wpse32840_register_post_type’ ); function wpse32840_register_post_type() { register_post_type( ‘client_gallery’, array( ‘label’ => __( ‘Client Galleries’ ), // probably needs better lables ‘public’ => true, // allow people … Read more

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