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’)

pmpro_member_number

The Shortcode Plugin

This code recipe requires a PMPro Plus Account or higher.

View Membership Options

Comments (15)

Is there this functionality please
how do I provide with free users access to upload 6 article only on the site after 6 article, they are required to pass with a pro subscription to continue upload.
thanks for the answer please

SVP. How can I add a menu button to make it appear only to users who do not yet have a subscription plan

and what Css can I use to post a pop up that will only be available to users who do not yet have a subscription

and how can i do the reverse please.

thank you for this great plugin and I am happy to put 5 stars

Hi! Paid memberships pro is indeed the best membership plugin out there! But I have a request- please make support accessible for free users or please release more affordable plans within 50 to 80 dollars. It’ll do great for many other users like me

Hi @mehulsrivastava,

Thanks for your comment. Have you tried commenting on our wp.org page or dropping us an email with your question? While we do not offer official support on these channels we do try our best to help our users as much as possible. Keep in mind that if the query is very technical in nature then we might need to direct you to our official support channel.

On a page, I tried something like: currently we are [pmpro_member_count justmember=true] in total

It didn’t work; somebody help!

Hi, Could this be used to count members who have bought access to a single page using the “Purchase Access to a Single Page or Post” Add On?

I was going to add this to the plugin/gist for you, but it gets complicated generating the text “This site has %s members”. If you wanted to update yours to do this, you could do something like:

$levels = array_map(‘trim’, explode(‘,’, $attrs[‘level’]));

And then update

AND `membership_id` = ” . intval($attrs[‘level’]);

to be

AND `membership_id` IN(” . $levels . “)”;

Leave a Reply

For faster support related to issues on your specific site please open a ticket in our members support area.

Your email address will not be published. Required fields are marked *