How to display only number of online users
-
I have a global variable global $online_users to display the number of users on site.
– how do i get only the number?
– which hook should i use (this one doesnt display)
thanksadd_action(‘plugins_loaded’, ‘nr_online_users’);
function nr_online_users(){
global $online_users;if ( function_exists(‘users_online’) ) {
$online_users = users_online();return $online_users; // (int)
} else {
return “no users”;
}
}`
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to display only number of online users’ is closed to new replies.