Showing specific plans only to paid users Answered
Hey everyone,
Is it possible to add multiple plans in the attribute to hide if any of them are checked.
For example, I want to show an item to only paid users and hide it from free users
so hence data-ms-content="!pro-plan"
and data-ms-content="pro-plan"
but the element with attribute "!pro-plan" is still showing even for users not signed up
How can I set it so it doesn't show for non-signed-up users as well? 🙏
Comments
7 comments
Hi Manuel,
These are the right attributes to use:
data-ms-content="paid-plans"
Only visible to all logged-in members who have a paid plan.
data-ms-content="!paid-plans"
Only visible to all logged-in members who do not have a paid plan.
The thing is I'm not using stripe paid plans.
I have 2 free plans, and one is tagged as paid 😢
Oh in that case, you would have to resort to Javascript. Give me some minutes to come up with something.
Oh okay thanks.
Would try here as well and see if it works.
Also, replace "pln_IDForFreePlanA" and "pln_IDForFreePlanA" with their plan ID's on your Memberstack dashboard.
Yeah tried it, and not working.
It's showing both of the items
and for users not signed up/login
It shows an error on console Unauthorize
website URL: flowscriipt.webflow.io
here's the link where the code is https://flowscriipt.webflow.io/app/dashboard
I tried this and it kinda worked, it checked if it could get the current user, and if not, set the element to display none. (though it still shows that console error. :)
Upon checking, I discovered you added the plan B ID in the plan A, that's why it didn't work.I also recommend you place this style in your HTML head block so it hides the buttons by default when the DOM loads.
Then you can replace the script I sent you initially with this:
Please sign in to leave a comment.