Customizing public preview card (Solved)

The public preview card says “This content is for subscribers only” no matter whether the content is for paid members or for all members.

On my site, I have changed “members” to “subscribers” and “paid members” to “members.” So, I would like the public preview block to differentiate between the two access levels.

Is there any way to customize it? And, I assume it is part of core, so I would need access to the core files via FTP to make a change, correct?

Assuming using the Krabi theme, in the theme /partials/post-upgrade-cta.hbs file, replace the content with the following, and the separation should work fine.

<aside class='c-post-upgrade-cta'>
  {{#has visibility='members'}}
    <h4 class='c-post-upgrade-cta__title'>{{t 'This post is for subscribers only'}}</h4>
    <a class='c-btn c-btn--action u-mb-16' href='{{ @site.url }}/signup/'>{{t 'Subscribe Now'}}</a>
  {{/has}}

  {{#has visibility='paid'}}
    <h4 class='c-post-upgrade-cta__title'>{{t 'This post is for paying subscribers only'}}</h4>
    <a class='c-btn c-btn--action u-mb-16' href='{{ @site.url }}/subscribe/'>{{t 'Subscribe Now'}}</a>
  {{/has}}

  {{#unless @member}}
  <p class='u-type-xs'>{{t 'Already have an account?'}} <a href='{{ @site.url }}/signin/' class='u-link'>{{t 'Log in'}}</a></p>
  {{/unless}}
</aside>

Thanks for this. I assumed that since the public preview card was in the editor, that it was part of core. Didn’t know I could customize it. Thanks!

My pleasure, Bruce!

Also, thanks for getting my attention; I will include this improvement in the next theme update.

1 Like

Can you please help with how to do this in Casper? @ahmadajmi

It’s already done in Casper, a different message for each post access, so there are no required changes.

In case you want to change the copy, check out the following:

Thanks @ahmadajmi sir. This was really helpful.

1 Like

This thread was super helpful for me and I was able to change the default copy on the public preview card. However, it also made it so that there was no public preview anymore, all of the content was hidden, instead of before when there were a few paragraphs publicly visible, and then the CTA to subscribe to keep reading. I used the code from github linked above. Am I missing something?