Ribbon for member card

Hello

When connected as a “member”, I would like to see the “members” posts with a specific ribbon. All other open posts without specific text :

https://www.cssportal.com/css-ribbon-generator/

I saw that posts have a visibility parameter. So I tried to add a Memberships & subscriptions tag first in partials/post-card.hbs but it doesn’t work:

            <header class="post-card-header">
                {{#if primary_tag}}
                    {{#primary_tag}}
                    {{#has visibility="member"}}
                        <div class="post-card-primary-tag">{{name}} #members</div>
                    {{/has}}
                    {{/primary_tag}}
                {{/if}}
                <h2 class="post-card-title">{{title}}</h2>
            </header>

Any idea how to proceed?

Best

That logic shows that the style only gets applied if there’s a tag on the post. Is there a tag on the post?

Are you getting the Div but the name is blank? Or what’s happening.

Depending on how you run Ghost, you may need to restart to see the change also …

Hi @Cathy_Sarisky

Thanks for your answer. I restarted ghost but when I’m visiting the website as a member, I don’t get the div, it’s blank.

I suspect that partial/post-card does not have a “visibility” parameter?