insert this code in your theme functions.php and use this shortcode [users_count_bro] to display where you want
function total_count_bro() {
$out="";
$user_count_data = count_users();
$avail_roles = $user_count_data['avail_roles'];
foreach ( $avail_roles as $role_key => $role_count ) {
$out .= $role_key.':'.$role_count.'<br/>';
}
return $out;
}
add_shortcode( 'users_count_bro', 'total_count_bro' );
Related Posts:
- How to display the names of users from a specific group with a shortcode?
- Audio or playlist shortcode condition according to the amount of files on attachment page
- Register visits of my pages in wordpresss
- create shortcode to list users with specific meta key value
- Enumeration Contact form using database table’s numbe of rows [closed]
- Create a shortcode that creates a form for users to edit their information
- How to list users by custom field?
- Multisite – maximum number of users with specific role
- Create a function to display HTML/data based on site admins role?
- How to insert current user ID/entry ID into a shortcode?
- Check if Page=current user page via shortcode
- Shortcode to show author role on the author archive page
- If the current user is an administrator or editor
- convert it into short code & explan how? [closed]
- How to check if a user is in a specific role?
- Enqueue Scripts / Styles when shortcode is present
- Getting a List of Currently Available Roles on a WordPress Site?
- Editor can create any new user except administrator
- Conditionally Loading JavaScript/CSS for Shortcodes
- What does extract( shortcode_atts( array( do?
- How do I escape a ‘]’ in a short code?
- Pass boolean value in shortcode
- Show shortcode without executing it
- How to allow an user role to create a new user under a role which lower than his level only?
- Shortcode always displaying at the top of the page
- Why are my roles not visible in a Multi-site/Network?
- Redirect function inside a Shortcode
- Remove Ability for Other Users to View Administrator in User List?
- How to create a shortcode with 1 parameter (atts)
- Find out if logged in user is not subscriber
- How do I programmatically set default role for new users?
- how to show the syntax of a shortcode
- Custom shortcode being executed when saving page in wp-admin
- Change appearance of shortcode text inside editor
- current_shortcode() – detect currently used shortcode
- shortcodes output before content [duplicate]
- WordPress plugin shortcode not working
- How to add stylesheets only to pages with specific shortcode?
- Groups of capabilities: users with multiple roles?
- User-edit role setting distinct from wp_capabilities? [closed]
- How to Display a List of Users Who Have Made at Least 1 Post?
- Using get_option() in JavaScript
- Shortcode empty attribute
- Check if user is admin by user ID
- How does a shortcode work?
- Shortcode outputs at the top of the_content
- the_excerpt and shortcodes
- Using wp_editor in shortcode
- Remove wpautop from shortcode content / remove whitespace in buffering
- Allowing users to edit only their page and nobody else’s
- Get current post id witout passing in shortcode
- alphabetically order role drop-down selection in dashboard
- Why are you using add_action for shortcode?
- How to get URL param to shortcode?
- How to add multiple buttons to TinyMCE?
- Check if post/page has gallery?
- Get first video from the post (both embed and video shortcodes)
- Execute a function when admin changes the user role
- Get shortcode name from within it’s callback function? [duplicate]
- How to let contributors to create a new revision(draft) editing their published posts
- Disallowing Users of a Custom Role from Deleting or Adding Administrators?
- What the user_status column?
- Wordspress add into my javascripts
- Add Custom User Capabilities Before or After the Custom User Role has Been Added?
- Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation
- How do I create a Shortcode that returns text if domain is .com, not .co.uk
- Using preg_replace to separate gallery from the_content?
- Remove specific shortcode from get_the_content()
- Hide Admin Menu for Specific User ID who has administrator Role
- How to display the site name in a WordPress page, or post
- Hide/show content starting in the middle of a paragraph
- Combining shortcode and get_template_part
- How can I put a wp_redirect into a shortcode?
- Escaping quotes from shortcode attributes
- How to hide media uploads by other users in the Media menu?
- Show admin bar only for some USERS roles
- Run visual composer code in php page
- short code output too early
- Shortcode in shortcode: How to append variable?
- Remove wptexturize from a shortcode?
- How can i put an array as variable in shortcode_atts?
- Autoembeds don’t work with paragraphs
- Table of Contents with a shortcode
- Grouping users under parent user
- Create custom [sourcecode] shortcode, the right way?
- TED talks shortcode not working
- Allowing shortcodes inside attributes
- What is the best way to enable nested shortcodes?
- Tinymce – How to hook before or after live shortcodes rendering?
- How to customize a shortcode using the customizer
- Native “playlist” shortcode random playing… How?
- How to Output HTML tags in do_shortcode?
- List of all inbuilt WordPress shortcodes
- Nested Shortcode Detection
- Shortcode output always showing at top of page
- Organizing shortcodes. How to display all of them and their attributes?
- How to detect if a Shortcode is being called on a page?
- How to get current page title inside a page itself in a shortcode and in page content
- Set a maximum upload count for users on a specific user role
- Show content only if member left a comment