Deprecated: Hook wpmem_inc_login_args is deprecated since version 3.3.0! Use wpmem_login_form_defaults instead. in /var/www/vhosts/rocketgeek.com/test.rocketgeek.com/wp/wp-includes/functions.php on line 6078
While the core plugin restricts posts to logged in users, and can also create memberships for other types of restriction, sometimes you may wish to restrict content to a user role.
This custom code snippet can be copy-pasted to wherever you store custom code and will add a list of roles to the WP-Members restriction meta box in the post editor, and then will restrict the content based on those roles.
Note that this functionality is included in the WP-Members Advanced Options extension.
To gain full access to WP-Members premium content, a current support subscription is required. You can purchase
an annual support subscription for as little as $59, which provides you with access to priority support, a
customer support forum, access to code snippets, and more.
Why wait? Choose your subscription option here.
[Why join?]