Paywall using member labels

I can not use stripe because my location

I integrate paypal button, but i want to keep the subscription for everyone and filter some post, pages to the paid users

Maybe using labels

How to achieve this?

Here ya go. This goes in the post.hbs file (also page.hbs), replacing {{content}}, but NOT within the #post context. (So do {{/post}} before it to get out of the post context, and and {{#post}} after it to get back into the post context.)

<div class="content-container">
{{#member.labels}}
    {{#match slug "onelabel"}}
    <div class="hasaccess">
    {{{../post.html}}}
    </div>
    {{else}}
    <div class="clevercssneeded">no access for you!</div>
    {{/match}}
{{/member.labels}}
</div>
<style>
.clevercssneeded {
    display: none;
}
.clevercssneeded:first-of-type {
    display: block;
}
.content-container:has(.hasaccess) .clevercssneeded{
    display: none;
}
</style>

This is wildly undocumented and probably an abuse of functionality that’s not intended, so no promises that it’ll work next week, but it works today.

The CSS is needed because Ghost checks EACH label to see if it matches.
(No, #has doesn’t work for labels, as far as I can tell.)

1 Like

Thanks,

But i am using ghost pro in starter plan, i can not download or upload the theme to do the changes.

How to achive this in the Ghost Pro Starter Plan?

Well then not using labels! (Laughing)

Link Stripe. (Yes, even if it isn’t going to actually work in your country.) That makes paid memberships possible, and you can set some posts to paid access only. Then when someone pays on PayPal, manually give them a complimentary plan on Ghost. Since the Starter plan doesn’t include integrations, there’s not a way to automate it.

1 Like

Good timing, @Cathy_Sarisky: I was just looking at what paid subscribers who became that way through a one-time donation outside of Portal see in their account info and “Subscription Details” at the bottom of emails. And they don’t see the membership level, even though when adding a comp, Ghost lets you choose the level. Instead, they see "complimentary subscriber. (See image below.)

Is there any way to have them see the membership level there? There’s an expiration date displayed, but still confusing UI/messaging. This might be a feature request to submit, I suppose. Or maybe it’s a mini-bug that could be changed with a language tweak that includes membership level along with “complimentary.”

Adding which tier for comp plans would be a good small feature request! Drop it in the ideas forum? Or hit me up if you’d like to fund it. :slight_smile: