Our Capture Name and Address for Free Levels or for Offsite Gateway Add On allows you to collect billing fields for a free level or for paid levels when using with an offsite payment gateway like PayPal Express.
This code recipe demonstrates how hide those additional billing fields for a specific Membership Level ID.
The code example below will allow you to add the logged-in member’s level ID (if available) to your site’s
body class. This can prove useful if you want to change the style of or even hide elements based on level.
Default Body and Post Classes
WordPress offers several functions that can filtered by plugins to add classes to your site’s
body element and posts elements. Below are the default filters Paid Memberships Pro adds to these elements:
Classes already added using the
Added if the post requires membership.
Added if the logged in user has access to the members-only content.
Added for each membership level the post requires.
These classes will be added based on the plugin page settings.
The Code Recipe
The code example below will allow logged in Members the ability to access your original homepage when using our Member Homepages Add On.
The code example below will prevent users from setting their username to an email address. This is useful if you want users to use an actual username instead of using their email address in both username and email fields.