惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
宝玉的分享
宝玉的分享
量子位
小众软件
小众软件
The Cloudflare Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
大猫的无限游戏
大猫的无限游戏
C
Check Point Blog
G
Google Developers Blog
博客园 - 叶小钗
H
Help Net Security
Jina AI
Jina AI
Y
Y Combinator Blog
Last Week in AI
Last Week in AI
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Apple Machine Learning Research
Apple Machine Learning Research
MyScale Blog
MyScale Blog
T
Tailwind CSS Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Vercel News
Vercel News

Example blog

Ghost routing explained with routes.yaml examples — routes, collections & taxonomies Ghost redirects explained with practical redirects.yaml examples How to Serve JSON or XML Data in Ghost How to Change Your Default Post Template in Ghost Ghost Custom Theme Settings How to add Google Fonts to Ghost Themes How to Configure Ghost with Mailgun Ghost Theme Structure & Organization How to Make Custom Templates in Ghost Themes How to Install Ghost CMS via Ghost-CLI How to Add Syntax Highlighting to Ghost The best Ghost CMS hosting platforms Ghost 6.0 — Social Web and Native Ghost Analytics Ghost CMS Social web beta, email 2FA and more author social links How to keep custom design settings when updating your Ghost theme How to use the public preview card in Ghost How to add members-specific sections in Ghost How to build a custom homepage in Ghost An overview of Ghost editor cards and and how they work Ghost CMS News: One-time payments & collecting sales tax How to customize the private site access template in Ghost How to add custom fonts in Ghost themes Ghost CMS News: Additional payment methods & internal linking How to use Code Injection in Ghost How to set meta data of your custom routes & collections in Ghost Ghost CMS News: TK reminders, ActivityPub and improvements How to format dates and use the date helper in Ghost Ghost CMS internationalization, custom fonts & spam protection Understanding and optimizing post and page settings in Ghost CMS Trigger the Ghost Portal popup based on page scroll progress
How to customize the default content CTA in Ghost
Bright Themes · 2025-02-18 · via Example blog

Ghost CMS includes a default content CTA (Call-to-Action) designed to encourage newsletter signups or paid memberships. While it works out of the box, customizing the CTA to match your brand and conversion goals can improve engagement and retention.

In this guide, we’ll walk through how to edit the content-cta in your Ghost theme by modifying the theme’s template files. Whether you want to change the text, adjust the design, or add dynamic content for members and subscribers, this tutorial will help you create a CTA that fits your needs.

What you’ll learn:
✅ Where to find the content-cta in your Ghost theme
✅ How to modify the CTA’s text, layout, and appearance
✅ Styling the CTA with custom CSS
✅ Best practices for improving conversions with a custom CTA

By the end of this guide, you’ll have full control over your Ghost site’s content CTA, making it more effective for newsletter signups, membership growth, or other calls to action.

Locating the content CTA in your theme

The content CTA in Ghost is a built-in prompt that encourages readers to subscribe or become members. While some themes include a dedicated file, others rely on Ghost’s default template.

To check whether your theme has its own template or uses the default one you can open the theme folder and look for the content-cta.hbs inside the partials directory. If this file exists, you can edit it directly to change the CTA’s text, layout, or styling.

When a theme doesn’t have the partials/content-cta.hbs, Ghost falls back to its built-in template: 👉 Default content-cta.hbs on GitHub

This default template is used automatically, and to override it, you must create partials/content-cta.hbs in your theme.

Editing Ghost’s default content CTA

This built-in template displays a subscription prompt based on post visibility settings, encouraging readers to subscribe or upgrade their membership.

Note

To customize the text and the layout of the template:

  1. Create a new file in your theme: partials/content-cta.hbs (or edit if it already exists)
  2. Modify the default template below as needed
  3. Upload your updated theme via Ghost Admin → Settings → Design → Upload Theme.

The default CTA uses some member-specific blocks as well as some checks regarding the visibility of the post.

Below is the default content CTA used by Ghost:

{{{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 {{#is "page"}}page{{else}}post{{/is}} is for paying subscribers only</h2>
    {{/has}}
    {{#has visibility="members"}}
      <h2>This {{#is "page"}}page{{else}}post{{/is}} is for subscribers only</h2>
    {{/has}}
    {{#has visibility="tiers"}}
      <h2>This {{#is "page"}}page{{else}}post{{/is}} is for subscribers on the {{tiers}} 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>

Let's break down the most important parts:

  • <aside class="gh-post-upgrade-cta">: The entire CTA is wrapped inside an <aside> element with the class gh-post-upgrade-cta. This makes it easy to style or reposition in your theme’s CSS.
  • style="background-color: {{@site.accent_color}}": The CTA automatically uses your site’s accent color, which is set in Ghost Admin → Settings → Brand. This ensures it blends with your theme’s design.
  • {{#has visibility="..."}}: Ghost determines who can see the post and customizes the CTA message accordingly:
    • visibility="paid" → Shown for paid-only posts.
    • visibility="members" → Shown for members-only posts.
    • visibility="tiers" → Shown for specific membership tiers.
  • {{#if @member}}: Ghost checks if the visitor is a logged-in member:
    • If logged in: Shows an “Upgrade your account” button, linking to the membership portal.
    • If not logged in: Shows a “Subscribe now” button, linking to the signup portal.

Customizing the layout and style of the content CTA

In case you want to customize the layout of the CTA, you have to change the content-cta.hbs accordingly. Add or remove elements or change the order, any kind of change you need can be done here.

Next for changing the style of the CTA, you can use the Code injection to add your custom styles.

Targeting the css classes you can adjust text and background colors, change the font, text size, etc. For example:

  1. Changing the background color:
<style>
  .gh-post-upgrade-cta-content {
    background-color: #f0e68c!important;
  }
</style>
  1. Changing the title color:
<style>
  .gh-post-upgrade-cta-content h2 {
    color: #000!important;
  }
</style>
  1. Changing the button style:
<style>
  .gh-post-upgrade-cta a.gh-btn {
    background: #000!important;
    color: #f0e68c!important;
  }
</style>

Best practices for an effective CTA

Use clear and compelling copy – Ensure your message is direct and action-oriented. Instead of “Subscribe now”, try “Join 10,000+ readers—Subscribe for free!”.

Ensure high visibility – The CTA should be easy to spot. Add sufficient padding, and use contrasting colors to make it stand out.

Personalize based on audience – Use Ghost helpers ({{#if @member}}, {{#has visibility="paid"}}) to display different messages for members, free subscribers, and guests.

Optimize button design – Make the button large enough for easy tapping, use a bold color, and ensure good hover effects to enhance engagement.

Test different versions – A/B test different CTA texts, colors, and placements to see what performs best for your audience.

Use in combination with the public preview card – The content CTA works especially well with the public preview, having a portion of the content publicly available can increase the effectiveness of the CTA


Customizing the content CTA in your Ghost theme allows you to align it with your brand and optimize it for conversions. Whether you modify the text, layout, or styling, a well-designed CTA can significantly improve engagement and encourage more signups or upgrades.