Change Copyright in Journal Theme

I’m a n00b to Ghost and - in all transparency - development inept. My expertise is in networking and security - not code. :frowning:

I’ve downloaded and attempted to modify the Journal theme to change the Copyright information that’s displayed at the bottom of each page. I’m lost. I am not savvy with HTML/CSS/etc.

I located the section in the default.hbs file where the copyright information is located:

    <footer class="gh-foot{{#unless @site.secondary_navigation}} no-menu{{/unless}} gh-outer">
        <div class="gh-foot-inner gh-inner">
            <div class="gh-copyright">
                {{@site.title}} © {{date format="YYYY"}}
            </div>
            {{#if @site.secondary_navigation}}
                <nav class="gh-foot-menu">
                    {{navigation type="secondary"}}
                </nav>
            {{/if}}
            <div class="gh-powered-by">
                <a href="https://ghost.org/" target="_blank" rel="noopener">Powered by Ghost</a>
            </div>
        </div>
    </footer>

I want to specify a company name instead of the site title. I’ve tried several times and each time I attempt to upload the modified theme, either the theme is broken, or I get an error message.

Would someone please give me a hand with this change?

Thanks in advance!

So you’ll want to remove all of this, including the {{ }} and add your new text. Then zip and upload. If that’s not working, please post your edit and the actual error message.

Hi - thanks for getting back to me!

I tried what you suggested before sending my message to the list, but I went through each variation of what I tried and captured the results for each.

  • First attempt

Removed: {{@site.title}}
Added: APRS Foundation Inc

        <footer class="gh-foot{{#unless @site.secondary_navigation}} no-menu{{/unless}} gh-outer">
            <div class="gh-foot-inner gh-inner">
                <div class="gh-copyright">
                    APRS Foundation Inc © {{date format="YYYY"}}
                </div>
                {{#if @site.secondary_navigation}}
                <nav class="gh-foot-menu">
                    {{navigation type="secondary"}}
                </nav>
                {{/if}}
                <div class="gh-powered-by">
                    <a href="https://ghost.org/" target="_blank" rel="noopener">Powered by Ghost</a>
                </div>
            </div>
        </footer>

    </div>

That broke the look & feel of the theme entirely:

I tried additional variations…

  • Second attempt - with single quotes

Removed: {{@site.title}}
Added: 'APRS Foundation Inc'

Same result as the first attempt

  • Third attempt - with double-quotes

Removed: {{@site.title}}
Added: "APRS Foundation Inc"

Same result as the first attempt

  • Fourth attempt - added curly braces

Removed: {{@site.title}}
Added: {{APRS Foundation Inc}}

I received the following message when uploading the theme package:

Fatal: Templates must contain valid Handlebars
Oops! You seemed to have used invalid Handlebars syntax. This mostly happens when you use a helper that is not supported.
See the full list of available helpers here.
Affected files:
default.hbs: Missing helper: “APRS”

I have a second Ghost site running the Casper theme and I found another document that covered how to make the change specifically for the Casper theme. It was a trivial change and it just worked.

Please let me know your thoughts. Again, I really appreciate the support!

Ah ha! I found another post that covered how to do it with Code Injection (footer):

How to remove the copyright symbol from the footer of journal theme - https://forum.ghost.org/t/how-to-remove-the-copyright-symbol-from-the-footer-of-journal-theme/46744/2

I reverted back to the original Journal theme, then added the following to Code Injection → Footer:

<script>
  document.addEventListener('DOMContentLoaded', function() {
      const copyrightElement = document.querySelector('.gh-copyright');
      if (copyrightElement) {
          copyrightElement.textContent = 'APRS Foundation Inc.';
      }
  });
</script>

That did the trick!!!

I would NEVER have figured that one out. LOL

I searched around and I guess I just didn’t find that document. In fairness, it was around 5:00 AM. :slight_smile:

Your first attempt should have worked. I’m suspecting an error in getting the theme zipped up or an accidental stray character (<? ) that broke something…