This addon has a collection of miscellaneous shortcodes and features for the Simple Membership plugin. Over time, more shortcodes will be added to it.
Once this addon plugin is installed and activated, you can use the shortcodes and features explained in this page.
Table of Contents
- Download the SWPM Misc Shortcodes Addon
- Install the Addon
- Allow Members to Change/Update Their Membership Level
- Enable Auto Downgrade of Expired Accounts
- Show Link to Member’s After Login Page
- Show the Total Member Count on Your Website
- Show the Total Members Count of a Membership Level
- Show the Total Members Count with Active Accounts
- Show the Total Members Count of a Membership Level with Active Accounts
- Hooks – Action and Filter Hooks
- Explore All Addons/Extensions
Download the SWPM Misc Shortcodes Addon
Click here to download the addon.
Install the Addon
- Click on the Add New menu under the plugins interface.
- Go to the Uploader tab and upload the swpm-misc-shortcodes.zip file.
- Hit the Install Now button and then activate the addon.
Allow Members to Change/Update Their Membership Level
Normally, members are required to pay to upgrade to a different membership level. However, you may want to offer a special page that allows members to update or renew their membership level free of charge.
This shortcode lets you create a button that members can click to change or upgrade their membership level instantly. It can be useful for offering free renewals or granting access to a new level without payment.
You can specify the Target Membership Level ID in the shortcode.
Below is an example of how to use this shortcode. In this example, the member’s level will be updated to level ID 3 when the button is clicked.
[swpm_update_level_to level="3" button_text="Update Level to Silver"]
You can optionally redirect members to a specific page after they click the button. The following example shows how to use the shortcode with a redirect URL:
[swpm_update_level_to level="3" button_text="Update Level to Silver" redirect_to="https://example.com/some-page" class="my-css-class"]
Account Status and Access Start Date – When a member uses this shortcode to change or update their membership level, their account status will automatically be set to “active”, and the access start date will be updated to the current date. This ensures the member can log in and fully access the content associated with the new membership level.
You should protect the page containing this shortcode so that only logged-in members or members of a specific level can view and use the button.
Enable Auto Downgrade of Expired Accounts
Read the auto downgrade feature’s usage instructions here.
Show Link to Member’s After Login Page
In some websites the “After Login Page” of a membership level is considered the homepage of that membership level. So you may want to put a dynamic widget on the sidebar that shows the after login page’s link.
If you want to show the link of the member’s after login page then use the following shortcode.
[swpm_show_after_login_page_link link_anchor="Your Home Page"]
Use the “link_anchor” parameter’s value to customize the anchor text of the link.
You can also use the “link_target” parameter in the shortcode to specify the link’s target. By default the target is set to “_blank”.
It will only show the link if the member is logged into the site and the membership level of the member has an “After Login Page” specified.
Show the Total Member Count on Your Website
Use the following shortcode to show the total members count of your membership site:
[swpm_show_members_count]
Show the Total Members Count of a Membership Level
Use the following shortcode to show the total members count of a particular membership level. In this example, the membership level ID is 2 so it will show the total members count of membership level ID 2:
[swpm_show_members_count membership_level="2"]
Show the Total Members Count with Active Accounts
Use the following shortcode to show the total members count of members with an active account status.
[swpm_show_members_count account_status="active"]
Show the Total Members Count of a Membership Level with Active Accounts
Use the following shortcode to show the total members count of a particular membership level with active account status. In this example, the membership level ID is 2 so it will show the total members count of membership level ID 2 with account status “active”:
[swpm_show_members_count membership_level="2" account_status="active"]
Hooks – Action and Filter Hooks
The following hooks are currently available for this addon:
swpm_msc_before_auto_downgrade_membership_level
This action hook is triggered before the auto downgrade feature applies the membership level downgrade.
swpm_msc_after_auto_downgrade_membership_level
This action hook is triggered after the auto downgrade feature has applied the membership level downgrade.
swpm_msc_update_level_to
This filter hook can be used to run custom code before the ‘swpm_update_level_to‘ shortcode applies a membership level update/change.
Explore All Addons/Extensions
To view all the available addons for the Simple Membership plugin, visit the Addons Page.