Trying to figure out a way to add an FTC affiliate disclosure near the author name like this:
Is this possible to inject with CSS?
I’m using the Casper theme on Ghost Pro.
I don’t want to edit theme files because I would have to pay more for the next Ghost tier.
Definitely possible to do with code injection. (Javascript and/or css.) Can you link your site?
1 Like
Put this in the code injection footer (or an html card in the post, or the post-specific code injection footer if you don’t want it everywhere). It won’t work in the HEAD code injection, because it needs to run after the top content is in place:
<script>
let target=document.querySelector('.article-byline');
target.insertAdjacentHTML("afterend", `<p>Put your text here<p>`);
</script>
3 Likes
@Cathy_Sarisky is this theme (Casper) specific?
Different themes use different CSS selectors. You can do something similar with any theme, but you may have to work out different selectors. Just spotted that I have an extra line in the code above. editing.
3 Likes