Archived topic
Revisiting "Hide Author"
12 replies · Started by Randy on October 11, 2021
Sometime back, you gave me some code to hide the author's name on posts. Worked for a long time, but now it's showing up again.
In Customizer, "Display post author" is NOT checked. Never has been. But it shows now, for example https://thisistrue.com/class-clown/
It also takes up the whitespace before the first paragraph. :-(
Suggestions?
Hi there,
I'm not seeing the author name in the linked post:
https://www.screencast.com/t/yrskvdAFVf7J
Am I missing something here?
Well that's awfully interesting: https://snipboard.io/KpasEO.jpg
And when I look at it in another browser where I'm not logged in, it's indeed not there.
But it sure is on the browser where I am logged in.
It's usually some sort of caching issue when the logged set up is different than the logged out set up.
Can you try disabling all caching plugins and server/hosting level cache?
And clear your browser cache as well.
Thanks.
I don't see how caching would be the issue when I've "never" had the author turned ON. I did clear the browser cache, which didn't help with the issue, but I can't disable plugins on a production site when I've sent out thousands of newsletters inviting readers to read the new post.
Hi Randy,
I've checked the site as well and I also don't see it on my end as well.
It can be an issue if you've hidden it using CSS which your site seems to be doing because you have this CSS on your child theme to hide it:
.entry-meta .byline {
display: none;
}
Which is unusual if the Display post author is unchecked because the HTML code for the author meta shouldn't even be included on the site if it is indeed checked.
First we confirm if it is unticked on the customizer. If it is, we then checked if its hooked manually by a PHP snippet.
Can you check your code snippets plugin,child theme's functions.php or a Hook element if there are any line of code with this hooked in?
<span class="byline">
Thanks for also taking a look, Elvin.
I believe that CSS is what Support suggested long ago to hide it when the Customizer checkbox didn't help. I just removed the CSS, and the byline still doesn't show when I'm logged out. Yay! Still weird that it shows when I'm logged in, since that's definitely new. (Just checked: still does.)
There is no use of "byline" in the child's functions.php.
I just removed the CSS, and the byline still doesn’t show when I’m logged out. Yay! Still weird that it shows when I’m logged in, since that’s definitely new. (Just checked: still does.)
It seems like it's still there. (on child theme's style.css)
https://share.getcloudapp.com/yAu0PDZ0
Perhaps your site has some sort of page caching from one of its plugins or from the server's setting itself. :D
Yes, stylesheets are cached. It should disappear "soon." Still not sure why it would suddenly start showing when logged in.
Yes, stylesheets are cached. It should disappear “soon.” Still not sure why it would suddenly start showing when logged in.
You can clear/purge the cache so it regenerates a new one based on the latest change.
But I think what'll happen is, the author will show up on non-logged in users as well after you purge it.
It's because the site as it is, your author byline is hidden by this CSS. And clearing cache means you're removing this CSS completely:
.entry-meta .byline {
display: none;
}
With is the one thing that hides(not remove) the author. (Remove is not equal to hiding it. removal is done on the backend w/ PHP, hiding is done with CSS.)
Removal of the author's HTML element is normally done through the customizer's unchecking of Display author name checkbox. And since it's not working on your end, the possible reasons are:
- Child theme template overriding the theme default, and is adding the author.
- The author is actually removed by the customizer but is re-added by a PHP snippet to a hook.
- Perhaps the author is actually removed but what we're seeing is a page-cached version served by the server. (This is unlikely)
– Child theme template overriding the theme default, and is adding the author.
– The author is actually removed by the customizer but is re-added by a PHP snippet to a hook.
– Perhaps the author is actually removed but what we’re seeing is a page-cached version served by the server. (This is unlikely)
None of these are the case. There are no recent template changes. There are no hooks.
There was a cache, as discussed, but I went through the tutorials of the minification/caching plugin and excluded the child's style.css. I've confirmed it's no longer cached, and no longer minified.
And I've confirmed that everything in it is being ignored: the blockquote settings, the hide byline, and more. I've tried multiple different browsers, including Firefox, which first had to update because it was three versions old -- I rarely use it. Same problem there.
Any ideas now?
Solved -- by my admin who I recruited into the Generate Press world.
The issue: a missing }
Sigh!
Good catch. Thanks for letting us know.
Glad you got it sorted. :D