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

推荐订阅源

Martin Fowler
Martin Fowler
D
Darknet – Hacking Tools, Hacker News & Cyber Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
小众软件
小众软件
V
Visual Studio Blog
T
Tailwind CSS Blog
博客园 - Franky
F
Fortinet All Blogs
D
DataBreaches.Net
Recorded Future
Recorded Future
雷峰网
雷峰网
GbyAI
GbyAI
博客园 - 聂微东
V
V2EX
Security Archives - TechRepublic
Security Archives - TechRepublic
SecWiki News
SecWiki News
N
News and Events Feed by Topic
PCI Perspectives
PCI Perspectives
Help Net Security
Help Net Security
Y
Y Combinator Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
云风的 BLOG
云风的 BLOG
TaoSecurity Blog
TaoSecurity Blog
K
Kaspersky official blog
AI
AI
The Hacker News
The Hacker News
C
Cybersecurity and Infrastructure Security Agency CISA
Project Zero
Project Zero
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
Security Latest
Security Latest
Hacker News: Ask HN
Hacker News: Ask HN
H
Help Net Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
I
Intezer
Spread Privacy
Spread Privacy
Blog — PlanetScale
Blog — PlanetScale
宝玉的分享
宝玉的分享
Cyberwarzone
Cyberwarzone
T
Threatpost
C
CERT Recently Published Vulnerability Notes
L
Lohrmann on Cybersecurity
S
SegmentFault 最新的问题
P
Privacy & Cybersecurity Law Blog
S
Securelist
A
About on SuperTechFans
WordPress大学
WordPress大学
G
Google Developers Blog
L
LINUX DO - 热门话题
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events

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 Deploy Your Ghost Theme with GitHub Actions How to create a custom recommendations page for your Ghost CMS theme Ghost CMS News: New editor, refreshed settings & recommendations Ghost CMS News: Source - the new default theme and native image editing How to Add Different Logos for Dark & Light Themes in Ghost Upgrade to Node v18 for Ghost CMS & common errors Ghost Snippets: Adding Schema markup in Ghost How to add a scroll-based progress bar to your Ghost CMS site How to Create a Custom Navigation Template in Ghost How to Segment Subscribers with Member Labels in Ghost The best way to create a contact page in Ghost How to Use the Ghost Subscription Forms in Your Theme & Posts How to update your Ghost site URL when self-hosting Ghost CMS News: Signup cards and better landing pages How to Add Breadcrumbs to Your Ghost Theme How to integrate the Applause Button into your Ghost theme How to Hide a Post From the Home Page in Ghost CMS Ghost CMS block and contentFor helper overview & tips How to add Image Lightbox to Ghost Themes Ghost CMS News: Signup form embed, new editor and bulk actions. Biron Themes becomes Bright Themes 🎉 How to Audit & Test a Ghost Theme How to Create Related Posts Section in Ghost How to Use Ghost Filter Expressions Ghost CMS newsletter settings and post analytics How to Update Your Ghost Theme When We Release New Versions Ghost CMS News: Automatic list cleaning & email troubleshooting How to Create a Featured Post Slider in Ghost How to Add Reading Time to Ghost Blog Posts How to Create a Post Archive for Your Ghost Theme Ghost CMS Price Helper Overview & Tips Self-Hosted Ghost CMS with DigitalOcean Ghost CMS News: Member Growth Sources & Audience Feedback How to Open External Links in a New Tab in Ghost How to Integrate Google Analytics with Ghost Ghost CMS News: History Log & Newsletter Analytics How to Automatically Add Member Labels From Referral Traffic in Ghost? Ghost CMS News: Free trials & email notifications Ghost CMS Match Helper Usage & Tips Ghost CMS News: Native Comments Ghost CMS News: Ghost Explore & Premium Newsletter Previews Ghost Snippets: Custom Progress Cards & Steps Ghost CMS News: Native Search The Best Ghost CMS Search Plugins & Libraries Ghost Snippets: Custom Stylish Tables How to Add a Scroll Top & Progress Indicator Button in Ghost Ghost Snippets: Accordions How to Add Tag Dropdown to Your Ghost Theme Ghost 5.0 released 🎉 Ghost Snippets: Custom Subscribe Forms Ghost Snippets: Custom Alert Boxes How to Show Post or Newsletter Issue Number in Ghost How to Self-Host Google Fonts in Ghost CMS Ghost CMS News: Membership, Tiers & Activity Feed Custom Pages in Ghost CMS Themes Ghost CMS Search Using Fuse.js Ghost CMS News: Offers and Discounts & New Cards Ghost CMS News: Membership tiers, email CTA & filters Ghost CMS News: Grammarly Support & Feature Image Captions. Ghost CMS News: Improved Member Accounts & Personalized Newsletter. Ghost 4.0 Launched With Native Newsletters & Membership Ghost CMS News: Cancellation Feedback & Newsletter Stats. Ghost CMS News: Improved Member Dashboard & Sidebar Views. Ghost CMS News: Google Pay support, email newsletters & secondary navigation Ghost CMS News: Member Support, Portal & Content Snippets. Ghost CMS News: Referral Programs & Responsive Images. Ghost Themes as Progressive Web Apps Ghost 3.0 is here with brand new features Ghost 2.0 is here with new features How to Add Search to Ghost Using ghostHunter
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.