So, we can’t add custom fields to the sidebar, right? That’s set in Ghost core, and not really open to modification.
But, I saw a post about adding something in code injection to change content on the page (using Javascript, I think?).
What I want to do is be able to make anyone an author of a story (or authors), without going through adding them to staff for only one or a few articles. AND, I want that name to show up in my theme where the author text normally is.
In short, I want the theme to check for {something} in code injection, and if that something is there, substitute what it finds for the author(s) name(s).
Thoughts?
PS – Custom fields for posts would be really nice. ;-)
1 Like
No custom fields in the sidebar.
You can always use javascript to rewrite part of the page. The problem is, the javascript can’t modify the content until the content has loaded, so if you’re changing something at the top of the page, you’re likely to get a flicker of wrong and then right, especially if anything is slowing down the page load.
The code involved is going to look something like
document.querySelector('.your-author-class-selector').innerHTML = "New Fake Author Name"
Of course, Ghost also generates meta data with the author’s name. And ld+json schema with the author’s name. And you won’t have an author page for your faked up authors (so probably you’ll want your function to unlink the author’s name, too). You can rewrite those and maybe convince the search engines, but it’s going to be wrong for social shares, and anything else that doesn’t actually parse javascript.
Rather than kludging that together, maybe you want an easier option for making new contributors? Jon Hickman posted a while back his solution for making new contributors, which was that he basically has an import file that just contains some contributors. He loads it, edits the name (/ghost > settings > staff), and then is ready to use go, without having to go through validating email addresses, etc. Here’s that post: Creating new authors - #5 by jonhickman
That’s not the answer to the question you’re asking, but I think it’s actually the solution to the problem you’re having. 
Yes, you’re right – there are pieces behind the scenes that would be messed up with implementing this. I guess I’ll have to figure out which authors are used enough to make adding them to “staff” a good idea.
And yes, I’ve done that Hickman approach in the past. I was hoping for a different solution, but if wishes were horses, beggars could ride. 
Thanks, as always, for your help. I hope everyone on here, if they need some custom Ghost work, turns to you. I sure will. 
1 Like