This post covers some options for customizing the message a non-member (either logged in or logged out) sees when trying to access a piece of members-only content.
The Default Message and Where to Modify It
In your WordPress admin, navigate to Memberships > Advanced Settings. Here you will see three separate message customization options:
- Message for Logged-in Non-members
This message replaces the post content for non-members. Available variables:
- Message for Logged-out Users
This message replaces the post content for logged-out visitors. Available variables:
- Message for RSS Feed
This message replaces the post content in RSS feeds. Available variable:
Customize the messages and click the “Save Settings” button. You can use HTML if you want to wrap the message in stylized boxes (per your theme or custom CSS) or use headings and other font formatting options. The message is wrapped by default in the
These messages will show on the single page/post as well as in the index/search/archive view if you have the setting Filter searches and archives? set to Yes.
More about excerpts can be found in the blog post here.
Using Advanced Filters
On our site, we override this setting with a custom function. Here are two code recipes that you will need to customize to show a unique message based on the logged-in user’s membership level or for a not logged in visitor.