Hello to all, as the title suggests, how to remove the copyright symbol, I want to put an alternate license for my content. Can I do it with the code injection or should I alter some config file.
Thank you in advance!
Hello to all, as the title suggests, how to remove the copyright symbol, I want to put an alternate license for my content. Can I do it with the code injection or should I alter some config file.
Thank you in advance!
This is usually implemented on a theme level, but if you don’t want to edit your theme, you could also get this done with code injection.
Would you mind sharing your domain? The official Ghost themes usually use the CSS class gh-copyright
, so you could target that with your code injection (or look for it in your theme files to edit it).
My domain is temporary, https://gexos.mymagic.page/, I tried the code injection but no luck, I will alter the theme files and I will re-upload the theme.
If you still want to give the code injection a go, this just worked for me
<script>
document.addEventListener('DOMContentLoaded', function() {
const copyrightElement = document.querySelector('.gh-copyright');
if (copyrightElement) {
copyrightElement.textContent = 'New text instead of the standard one';
}
});
</script>
Thank you, yes that worked for me too, but on the post page only, what file to alter to have this change in all the pages of my site.
Hm, this should definitely work on every page (unless the theme sets different CSS classes for the copyright message for different pages – but yours doesn’t do that).
Have you put that in the code injection inside Ghost’s settings? Or in a post/page-specific code injection?
Yes you are right it works everywhere, thank you very much