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.