Hi, I’m running Ghost Pro here: osmosis.dev
Quick question: How do I change the copy in the CTA box after the Public Preview?
For instance: What's The Next Book?
The red box says “This post is for paying subscribers only” and the button says, “Upgrade your account”
And this one: Osmosis Weekly #0000
The red box says: This post is for subscribers only" and the button says, “Subscribe now”
Can I change the copy in these four areas?
Please and thank you.
If the Pro hosting service allows you to connect to your installation, you can change theme files and change the Portal into whatever you like.
The pro hosting service does not allow this on the Starter plan, but does allow for custom themes starting on the Basic plan. This mean you can alter the
content-cta.hbs file and other files to better match what you want the text and links to be.
For editing, as in changing files outside of the theme, the Ghost pro hosting plan does not allow this - no matter what plan you’re on. I might be wrong.
Self-hosted installs have access (obviously) through a command prompt / terminal, sFTP or – if hosting on a Digital Ocean droplet, access using the console.
You might wanna reach out to a Ghost staff member such as Kevin or Hannah and ask them about editing files outside the theme on a Ghost pro hosting plan.
The portal is a third party script hosted by unpkg CDN and in order to change it, a few steps are involved.
You need to download it, edit according to what you need, upload to your theme and change your
config.production.json file (point the portal script to be loaded from your theme instead of the CDN).
All the best!
Hey, I failed to find what to change on config to point to a local copy of portal.min.js?
You can read about it here. Hopefully, easy enough to understand.
You can add a
./partials/content-cta.hbs file to your theme, there’s no need to mess around with the portal script.
Thank you for the thoughtful and thorough reply @thebear.dev ! Unfortunately, I am on the Ghost Pro hosting plan.
@Kevin - THANK YOU! I’ll give this a shot and let you know how I do.
@Kevin - Hey, so I added an empty
./partials/content-cta.hbs file to my theme and now the CTA is completely gone…
That’s not exactly the solution I’m going for. I wanted to change the copy/words in the CTA.
Am I supposed to put some code in the
Yes, the code you’ll put in this file will override the default CTA. Maybe you can copy/paste the default CTA and customize the parts you need to.
Yeah… I figured that out a little later. Unfortunately, I don’t know code well enough to know what to put in there. As it stands right now, the support page basically says “create an empty file called content-cta.hbs” and that will override what they currently have.
I would love a copy/paste solution here. But the original CTA is on Ghost’s server and not in my theme, so I have nothing to copy/paste.
What theme are you using? If it’s a free theme I can check and hopefully provide code you can copy & paste. If so, I’ll provide generic text so that you understand what to replace with your own.
The original is here https://github.com/TryGhost/Ghost/blob/main/core/frontend/helpers/tpl/content-cta.hbs
Any time you’re overriding a default file like this you can use the “Go to file” button on the GitHub repo and start typing the file name to get the original
THANK YOU! That’s exactly what I needed @Kevin !!!