Removing the “Powered by Ghost” Text from Sign-in and Sign-up Forms
I’ll show you a simple way to remove the Powered by Ghost text that sits in the bottom left corner of your sign in and sign up / sign in forms on your website.
Many Ghost website owners want to remove the Ghost CMS label from their website. Here, we’ll walk you through a straightforward solution. It’ll let you remove the Powered by Ghost label that shows up in the bottom left corner of your website’s sign in and sign up forms.
Removing this label can be a bit tricky. You might think you can just use a CSS rule to make it disappear, but that won’t do the trick. Instead, we’ll need to use a small JavaScript code to get the job done.
Here’s the code:
<script>
window.addEventListener('load', ()=>{
let ghostPortal = document.getElementById('ghost-portal-root');
let ghostPortalWrapper = null;
let ghostPoweredFinder = null;
const findandRemoveGhostPowered = () => {
let ghostPowered = ghostPortalWrapper.firstChild.contentDocument.body.querySelector('.gh-portal-powered');
if(ghostPowered != null){
ghostPowered.style.display = 'none';
clearInterval(ghostPoweredFinder);
}
}
let portalObserver = new MutationObserver((mutations)=> {
mutations.forEach((mutation) => {
if(mutation.addedNodes[0]?.nodeName === 'DIV'){
ghostPortalWrapper = mutation.addedNodes[0];
ghostPoweredFinder = setInterval(findandRemoveGhostPowered, 50);
}
});
});
portalObserver.observe(ghostPortal, {
attributes: false,
characterData: true,
childList: true,
subtree: true,
attributeOldValue: false,
characterDataOldValue: true
})
})
</script>
How to Use the Code
- Copy the JavaScript code above.
- Sign in to your Ghost admin area and go to Settings.
3. In the Code injection section ,paste the code into the Site Footer box (see image of Ghost admin settings with code injection box).
4. Save your changes.
That’s it The Powered by Ghost text will now be hidden on your sign in and sign up forms.
Happy blogging.