Remove 'Powered by Ghost' from Ghost Portal

Frustrated by the "Powered by Ghost" pops out when users subscribe or sign in to your Ghost blog? Want to remove it?

The "Powered by Ghost" shown on the subscribe and sign-in portal is managed by Ghost and themes can't control this, and removing it requires a little more effort. Don't worry, this article shows you an easy way to remove it.

Put the following code in the "Site footer" through "Code injection" (you can find the 'Code injection' in Ghost settings).

<!-- Remove 'Powered by Ghost' on Portal -->
<script>
  const parentElement = document.querySelector('body');

  const observer = new MutationObserver(function (mutations) {
    mutations.forEach(function (mutation) {
      if (mutation.type !== 'childList') {
        return;
      }

      const portalFrame = document.querySelector('iframe[data-testid="portal-popup-frame"]');

      if (portalFrame) {
        portalFrame.onload = function () {
          const doc = portalFrame.contentWindow.document;
          const style = document.createElement('style');
          style.textContent = '.gh-portal-powered { display: none; }';
          doc.head.appendChild(style);
        }
      }
    });
  });

  const config = { childList: true, subtree: true };

  observer.observe(parentElement, config);

</script>

Done, you won't see "Powered by Ghost" now. If this doesn't work for you, contact us at 📮 [email protected], we are happy to help you.