How can I completely disable the author-box only for a selective author, i.e., while I want to show author-box generally but want to disable display of author-box of a selective author on all his posts. Let us the selective author is “xyz”.
I understand that it can be done using Custom CSS “display:none” command, but what exactly to use for the author “xyz”?
You would likely need to edit the query for the author box element with an if user 123 based on the user id number, then dont show box, else show box.
Tagdiv should be able to point you at right file with screen shot and some example code to try, when they get back in monday.
Hi
To remove the author box from posts written by a specific author you need to add a condition in td_module_single_base.php file like here: http://screencast.com/t/AOLLk9j3A
if ($author_id == 3){
return;
}
If you want to remove author name from article top add this condition in td_module_single_base.php file here: http://screencast.com/t/rzD39z79MEPG – http://screencast.com/t/hxs4uMhoo1Y
if (($this->post->post_author) == 3){
return;
}
To get the author id follow this link: http://screencast.com/t/5kY7lLtFB1MT – http://screencast.com/t/vO2XeRsO4HK7
Let me know how it goes!
Thanks!
Hi Andrei,
I need to remove author name from all posts. I’ve tried to add the following code in td_module_single_base.php in the place shown in your screenshot (lines 69-71):
if (($this->post->post_author) == 3){
return;
}
However, it didn’t change anything.
Maybe it has to do with getting the author ID you mentioned, but this part was completely unclear to me. First, I couldn’t find the code mentioned. Also, is this supposed to be related to a specific author, because I want to remove all of them?
Thanks
chauffeur,
If you want to disable author-box for all authors on posts, then there is a much simpler solution without editing the theme-code files.
On the admin side of your WordPress, click “Theme Panel” and then select “Post Settings”. Then, from the details that appear, again select “Post Settings” from the right-pane. There is an option called “Show Author Bpx”. Simply, unselect this option and the author Box will not be shown on all posts.
Hi
@chauffeur the code I provided remove the author name only from posts written by the author with id=3. If you want to remove the author name from all posts you can use the theme option as @tilakmarg suggested.
Thanks!