Using Memberstack 2.0? There is an updated version of this article here.
Use data attributes and links to hide individual contents of a page.
About this article
-
Difficulty level: Easy
-
Technical background needed: Beginner
-
Estimated time required to complete: 5-15 mins
This feature is available on website builders that support data attributes (like Webflow, Duda, Carrd, HTML).
What and Why?
When you create a new type of members-only content, Memberstack automatically creates an attribute you can use to hide elements on a page (instead of the entire page). This is handy if you want to place some members-only content on a public-facing page. It could be a button, a video, a banner message, a coupon, etc.
Note: If Memberstack fails to load, this content will be visible to everyone. We don't recommend hiding extremely sensitive information with Memberstack.
How?
Tag members-only content
data-ms-content="contentID"
You can find the "contentID" at the bottom of the memberships page after you create some members-only content.
For example...
Elements with the data-ms-content ="basic" attribute are only visible to members with a basic membership.
Hide content from a particular membership
data-ms-content="!contentID"
You can create this attribute by adding an "!" before the value. It's the opposite of members-only content.
For example...
Elements with a data-ms-content="!basic" attribute are hidden from members with the basic membership.
Hide content from all active members
data-ms-content="!members"
Content with the data-ms-content="!members" attribute are hidden from all active members no matter what membership they have, e.g. signup links.
https://forum.memberstack.io/t/a-dropdown-menu-visible-just-for-members/1118/2
Hide content for all non-members
data-ms-content=“members”
Content with the data-ms-content="members" attribute are hidden from all non-members.
Keywords: hide, content, page, members, non-members, active, members-only, attribute, elements
Comments
0 comments
Please sign in to leave a comment.