- This topic has 5 replies, 3 voices, and was last updated 8 years ago by .
- The topic ‘Show or Hide Author Box conditionally (based on post author)’ is closed to new replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
Tagged: author box
We have a blog, http://www.humoroushomemaking.com, that I built by heavily customizing the Lifestyle theme. We periodically allow guest contributors. In all cases EXCEPT where we have a guest contributor, I want the author box on the bottom of the post. This is no problem. However, when we have a guest contributor, I don't add them as an official author but instead assign them to a user account we set up called "guest contributor". In these cases, I don't want the author box to show at the bottom of the post (or at all, for that matter). Is there a conditional statement I can build that will hide the author box when the author is "guest contributor"? An example post by a guest contributor can be found here: http://www.humoroushomemaking.com/we-make-too-much-money-to-be-broke-a-debt-free-storyhttp://www.humoroushomemaking.com
If you visit each user profile page on a Genesis site and scroll to the bottom, you'll see the ability to enable (or disable) the author box on the posts and / or author archive page on a per author basis.
Hope this helps.
That's such a SIMPLE solution...and it works! Thank you Sandee!
Okay, scratch that - it doesn't work...when I uncheck the box in the user profile and hit Update User, it re-checks it. Hmmm... It does the same thing for any user I try to make that change. Other boxes can be checked/unchecked.
I was able to get it figured out. Thanks to all who helped. Here's what I found. In my functions.php, I had:
//* Display author box on single posts
add_filter( 'get_the_author_genesis_author_box_single', '__return_true' );
This was keeping me from unchecking the box in the Users section of the wp-admin. I initially used Brad's statement to try and edit the rights, but quickly realized I could just remove the above statement entirely and the Users section Sandee mentioned would become editable again. Simple fix, just took me a while to get there...
Thanks to all!
© 2024 WPEngine, Inc.