Removing Powered by Ghost

Hi, I have two Ghost sites, and when I click the Subscribe button, I get the Powered by Ghost advertising, please see screenshot. It’s also very visible on the mobile. Please see screenshot: Screenshot by Lightshot

I have no problems promoting Ghost on some of my sites. But on some sites where I am dealing with kids, I would prefer to remove all third party links. Since I am paying for the hosting, I kind of feel I should have some choice in this. Does anyone know how I can remove the Powered by Ghost link?

Thank you in advance.

Should just be some css no? I would do something like .unwanted-advertising-example {display:none} in the header under code injection.

1 Like

Hi, Thanks. I do not know how to code. Would you know what the exact line should be? I am trying to figure out, but the things I have tried have failed. Thank you.

That “Powred by Ghost” is being directly implemented by the portal script and that link is within an iframe. That iframe is also being added and removed dynamically by clicking on the subscribe button and on exiting the portal. So direct CSS in code injection will not work. Although this can be done by javaScript.

The javaScript code has to be running all the time for each loading and unloading of that portal iframe.

I think if Ghost gives an inbuilt option to hide that will be super-efficient. Following is a code block you can add to the code injection. As this is javascript I will recommend adding it in the footer code box.

Please keep in mind this is not the best way to do this. Use it with caution!

Here is the code:

<script>
window.onload = function () {
    let portal = document.getElementById("ghost-portal-root");
    const interval = setInterval(() => {
        let frame = portal.querySelector('[title="portal-popup"]');
        if (frame !== null) {
            const styleElement = document.createElement("style");
            styleElement.innerHTML = `.gh-portal-powered { display: none; }`;
            frame.contentDocument.head.appendChild(styleElement);
        } else {
            frame = null
        }
    }, 300)
}
</script>
1 Like

Thank you so much I appreciate it a lot. Although I have not done an in-depth test, based on initial test it seems to work fine. I also understand your warning.
I know you didn’t have to do this, but you did anyway. So, thank you.

I believe this script is theme specific, meaning, it seems to work for the Digidocs theme perfectly.

I have an offer an offer to make to you or anyone else. If you can do the same script for this theme below (Okiro) I’ll put $25 into your PayPal account. I know it’s not big money. It’s my way of saying thank you for doing it for me.

One thing I want to correct here. This is not theme-specific. If you use the portal, then the popup will be shown regardless of the theme you use.

The theme link you have provided for example uses custom code and available helpers of ghost to implement those membership features without the portal.

For example, check this theme. If you click on sign up or “sign in” links in the header menu will visit different pages with a custom form which are built into the theme. But if you click the floating button at bottom right corner then you will see the portal. Which shows the “Powered by Ghost” link"

The code I have provided will not interfere with any theme, it works on the portal feature which is built-in feature of Ghost.

The theme Okiro is made by @fueko and this theme already has the custom membership mangement features like sign up/login pages, and also the pricing page. If you want tyou can just use those and disable the portal button from your ghost dashboard.

1 Like

Hi Biswajit, thank you. As much as I know what you say is true, however, I have failed in my attempts to remove the powered by pm pn Okiro even thoiugh the script is not theme specific, it won’t work Okiro but will work on DigiDocs theme (at least for me). So, my offer is still there to you or anyone else. I have 2 Ghost themes where I need to remove powered by. I know I can turn off the portal feature so that it doesn’t display, but I kind of link the portal feature.

Anyway, as it’s now 2 sites, I am willing to pay $40 to anyone who can do it. Plus I would like the person to past the Hyvor commenting tool for me. I already have the commenting code.

Thank you to you Biswajit, you have great Ghost themes, and you provide exceptional support to your customers. I mean that. I have bought many Ghost themes on and off over the years, and you are one of the few people who I have met who doesn’t make a fuss. So, you have my gratitude.

1 Like

I am very happy and glad that you liked my themes and my support. I always try to satisfy my customers who spend their hard-earned money on my product.

Thank you very very much for saying it loudly in the open forum. It means a lot to me. :heart:

1 Like