s2Member: More Membership Levels

The s2Member plugin is an awesome membership plugin for WordPress. The drawback is that you only have 4 levels of memberships and sometimes that’s not enough.

s2Member information

The s2Member plugin is a membership management plugin for WordPress. It supports up to 4 membership levels and if you want more membership levels you can buy the s2Member Pro module, but at $69.00 this might be a bit steep for some of you out there. The s2Member Pro module does not just give you the ability to extend the amount of membership levels, it does a whole lot more and is definitely worth it’s money of you need some of those extra features.
You can find more information on the s2Member website.


It is actually fairly easy to add membership levels. All you need to do is add a small bit of code to your theme. Just add the code found below to your themes functions.php and you are good to go.
I don’t recommend increasing the amount of membership levels way to high, it will have an impact on the performance of your site.

The code

This is the entire code you need to add:

add_action('init', 'avh_s2member_add_membership_levels');
function avh_s2member_add_membership_levels() {
	// Set total amount of membership levels
	$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"] = 10;


Line 4: This is where you set the amount of levels you want. In this example it is set to 10.

Final thoughts

If you have a site that requires memberships I highly recommend the s2Member plugin. The s2Member Pro module gives you the ability to add several ways for people to pay for their membership. If you have a site that requires paid memberships don’t hesitate to use the s2Member plugin in combination with the s2Member Pro module.

s2Member® is a registered trademark of WebSharks, Inc

This article is filed under the categories Development » WordPress » Code Snippet and has the following tag associated with it: .
  • thanks for this code snippet. We have integrated it into our s2member addon. With the code you outlined, we know how many levels exist and can offer users the opportunity to set features depending on the levels available.

    Our plugin focuses on directory listings. Now, s2member can handle all the membership/payment stuff, and bepro listings can manage the rest.