I am the sole “author” on my blog, so I would like to remove all links and references to author(s) from posts (existing, and future), etc. Is that possible? If so, how? Thanks!
Which theme are you using? Casper?
Yes, I am using the default theme. Apologies for neglecting to mention it.
Try pasting this into your site’s code injection:
<style>
.author-list,
.author-name {
display: none;
}
</style>
That will hide the author (icon, name, and link) on single posts, but leave name and link on the main page, and on the next/previous mini-cards at the bottom of a post. Close, but no cigar.
Do you have a URL?
Yes, https://ghost.collantes.us/. I have the feeling this will not be fully possible without editing the theme itself.
Try this:
<style>
.author-list,
.author-name,
.post-card-byline-content span:first-of-type {
display: none;
}
.post-card-byline-content {
margin-left: 0;
}
</style>
That did it, thank you! I know this is a CSS override, but, will this stop the unmodified theme from being updated on future updates?
Glad to hear it. And no, just leave the code there and you’re all good to go with future updates.
can I use this for a different theme? i’m using a free theme from ghost still, attila
@space_sheep Looking at the code for Attila it looks like it would be possible to get rid of the author name on the actual posts using simple code injection but not on the home page (without getting rid of the primary tag as well as the date). To do so with the latter you’d have to edit the HTML of the theme itself.
Hi. I’m using Ruby. The code works to remove author information in posts, but the card for the information and the author avatar remains. Is there a way to modify the code injection to actually remove the author card altogether?
Looks like the whole card is created within this block:
<section class="author u-shadow">
So, you can select based on ‘author’ class and use the below code. But be careful as this is a very broad filter and will catch anything with ‘author’ class (which i found no other reference in the post page)
<style>
.author {
display: none;
}
</style>
I tried myself and it removed the card from display.
I added this code and it removed the author and link. However it still says “Published by:” on the bottom of my post. How to I remove that text? (Edition theme)
You can amend it all to the following:
<style>
.author-list,
.author-name,
.single-footer-top,
.post-card-byline-content span:first-of-type {
display: none;
}
.post-card-byline-content {
margin-left: 0;
}
.single-footer-bottom {
margin-top: 0;
}
</style>
Hi there @Stromfeldt ,
Thank you for this piece of code. Its good for technically challenged people like me. I’m using this on my site and it works, I just have one request though -
Can you help modify the code a bit more to just hide the name of the author and let the icon (author pic) be visible?
Would be of great help. Thank you.
PS - I’m using the default theme CASPER.
Thanks!
Is there a way to do this for the email newsletter as well?