This nifty little shortcode will output the number of members in a level (or across all levels).
The output displays a message in the format: “This site has 25 Gold members”, or you can define the attribute ‘justnumber’ to output only the count of members and craft your own message like the one pictured to the right.
Shortcode Attributes
- justnumber: Show just the count of members (optional; default: NULL)
- level: A single level ID or comma-separated list of level IDs (optional; default: count for all levels)
- status: A single status or comma-separated list of statuses (optional; default: ‘active’)
The Shortcode Plugin
Copy and paste this code into a standalone .php file and upload to your site’s ‘wp-content/plugins’ folder. Activate the plugin via the Plugins admin page.
Free Course: Membership Site Development—The Basics
Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.