Customize the Members CTA on Gated Ghost Posts

Replace the fixed wording on Ghost's members-only post box with your own copy per tier, using Ghost's built-in code editor. Paste-ready snippet included.

Luxe Themes 4 min read

Quick answer: Ghost lets a theme override the “This post is for subscribers only” box with a partial named content-cta.hbs. You don’t need to edit your theme’s source — create the file in Ghost Admin under SettingsTheme (next to the active theme) → Edit code, paste the snippet below, and change the wording per gating case. Keep the {{{html}}} line: it renders the post’s free preview.

What the members CTA is

When a post’s access is restricted — to members, paid members, or specific tiers — visitors without access don’t see the post body. Ghost swaps it for two things:

  1. The free preview: everything above the public preview divider in the editor (if you added one).
  2. A call-to-action box (“This post is for subscribers only”) with a signup or upgrade button.

The box already looks right on any well-built theme: Ghost injects base styles for it on every members-enabled site, and Luxe themes style it further to match the theme’s typography and colors.

What you can’t change from Ghost Admin is the wording. It’s fixed by Ghost — the same phrasing whether signing up is free or paid, with no way to add your own pitch, mention pricing, or write different copy per tier.

Replace it with your own

Ghost checks your theme for a partial named content-cta.hbs and, if present, renders it instead of the default box. Ghost Admin’s built-in code editor can create that file directly on your site — no download, rebuild, or re-upload.

  1. In Ghost Admin, go to SettingsTheme, open the menu next to the active theme, and choose Edit code. (For a theme that isn’t active: Change themeInstalled → the theme’s menu → Edit code.)
  2. In the editor’s file list, click the + (new file) icon and enter partials/content-cta.hbs as the file path.
  3. Paste the snippet below. It mirrors Ghost’s own default template, so your site keeps the exact same look until you change the words.
  4. Edit the headings and button labels to taste, then click Save — the change is live immediately.
{{{html}}}
<aside class="gh-post-upgrade-cta">
<div class="gh-post-upgrade-cta-content" style="background-color: {{@site.accent_color}}">
{{#has visibility="paid"}}
<h2>This post is for paying subscribers only</h2>
{{/has}}
{{#has visibility="members"}}
<h2>Sign up for a free subscription to keep reading</h2>
{{/has}}
{{#has visibility="tiers"}}
<h2>This post is for subscribers on the {{tiers separator=", " lastSeparator=" and "}} only</h2>
{{/has}}
{{#if @member}}
<a class="gh-btn" data-portal="account/plans" href="#/portal/account/plans" style="color:{{@site.accent_color}}">Upgrade your account</a>
{{else}}
<a class="gh-btn" data-portal="signup" href="#/portal/signup" style="color:{{@site.accent_color}}">Subscribe now</a>
<p><small>Already have an account? <a data-portal="signin" href="#/portal/signin">Sign in</a></small></p>
{{/if}}
</div>
</aside>

How the snippet works

  • {{{html}}} renders the free preview — the part of the post above the public preview divider. This line must stay first: your partial replaces Ghost’s entire gated output, so removing it removes the preview too.
  • Each gating case gets its own heading. The {{#has visibility="..."}} blocks match how the post is restricted: members for free-member posts, paid for paid posts, tiers for tier-restricted posts. Write different copy in each — this is the whole point. The {{tiers}} helper prints the tier names the post is limited to.
  • Signed-in members see an upgrade button instead of signup. The {{#if @member}} branch handles a logged-in free member hitting a paid post: they get “Upgrade your account” and are taken straight to the plans view.
  • The data-portal attributes wire the buttons to Ghost Portal — signup, sign-in, and plan selection all open in the standard membership modal.
  • The gh-post-upgrade-cta classes keep the styling. Ghost (and your theme) already style these classes, so the box stays visually identical to the default. Change the words freely; leave the class names alone.

Surviving theme updates

Files created or edited through Edit code live in your site’s copy of the theme. Uploading a new theme version replaces that copy — including your partial. Keep the contents of your content-cta.hbs somewhere handy and re-apply it after each update; it takes under a minute.

Troubleshooting

  • Parse error mentioning INVALID when saving — the paste picked up invisible characters (this happens when copying from a rendered web page). Use the code block’s copy button above, or re-type the affected line.
  • The free preview no longer shows — the {{{html}}} line was removed or moved. It must be the first line of the partial.
  • The box lost its styling — a class name was changed. Keep gh-post-upgrade-cta, gh-post-upgrade-cta-content, and gh-btn exactly as they are.

Frequently Asked Questions

Can I change the wording on Ghost's members-only post box?
Yes. Create a file called partials/content-cta.hbs in your theme using Ghost's built-in code editor (Settings, then Theme, then Edit code in the active theme's three-dot menu). Ghost automatically uses your file in place of its default call-to-action box, and you can write different headings for free-member posts, paid posts, and tier-restricted posts.
Why did my post's free preview disappear after adding a custom content-cta partial?
Your custom partial replaces Ghost's entire gated-content output, including the free preview above the public preview divider. The first line of the partial must be the triple-brace html expression, which renders that preview. Without it, visitors see only the call-to-action box and none of the free portion of the post.
Will my custom members CTA survive a theme update?
No. Files created or edited through Ghost's code editor live in your site's copy of the theme, and uploading a new theme version replaces them. Keep a copy of your content-cta.hbs and re-apply it after each update — it only takes a minute.
Does the custom members CTA work with any Ghost theme?
Yes. The snippet mirrors Ghost's own default template and uses Ghost's standard gh-post-upgrade-cta classes, which Ghost styles automatically on every site with members enabled. All Luxe themes additionally style those classes to match the theme's typography and colors, so the customized box looks identical to the default one.