Hello,
It can be done but only by editing the theme files as there is no setting for this.
You can replace this code: <?php echo $td_mod_single->get_author_box();?> with this one
<?php if (!current_user_can('edit_theme_options')) { echo $td_mod_single->get_author_box();}?>
And you can add it like so on each post template file: https://www.screencast.com/t/98szyfiMDbQ
You have to do this for each of the 14 post styles as each one has it;s own file (if you do not use all 14 just edit the ones you use on your site)
Thank you!
Hi,
Ok, it seems we need a different approach to this.
You need to add an extra class at the author box wrap. You should edit the td_module_single_base.php core field and you should do this -> https://www.screencast.com/t/lAjMJPl7 The snippet of the code which has to be concatenated is here ->
. get_the_author_meta('display_name', $author_id) . ' After these changes, you should use a bit of CSS code and hide the author box for your certain author. Try the code below and place it in Theme panel->Custom CSS area.
The code is ->
.author-box-wrap.ziar_6{
display:none;
}
(ziar_6 is the name of my admin)
The result is here-> https://www.screencast.com/t/yDtNzUECOB
Thanks
Hi
I complete line 853 of td_module_single_base.php with:
$buffy .= '<div class="author-box-wrap ' . get_the_author_meta('display_name', $author_id) . ' ">';
And add in custom css:
.author-box-wrap.Maricel7{
display:none;
}
(with my administrator name)
But still I have the admin box in the post, that I don’t want.
There are some error?
Thanks!
This is an example.
http://chilecientifico.cl/chilecientifico/2017/03/29/cientificas-chilenas-que-cambiaron-el-mundo-una-inspiracion-para-que-ninas-y-jovenes-pierdan-el-miedo-a-las-ciencias/
There are many articles like this.
Hi,
Please make sure you enter the code mentioned properly in the theme files, and use exactly the same syntax
– https://www.screencast.com/t/U6VVZtzDLT
I have tested this method and it is working properly, the author ID is appearing as a class next to the author box wrap, in the code – https://www.screencast.com/t/4zOmkOuchnF
In your case the author name does not appear – https://www.screencast.com/t/DKwEOjaM
After you modify the code as indicated, you can use the css solution and hide the author box for that particular author.
Thanks
Thank you very much, now it works! Maybe it was a part of the code in the php file, although it looked the same, I re-wrote it back and it worked.
Thanks again!
I have updated the theme to 8.6 and I’m trying to do this again but there is no more
. get_the_author_meta(‘display_name’, $author_id) . ‘
in
td_module_single_base.php
Can you please give me some new instructions?
thanks
-
This reply was modified 8 years by
dharma3d.
No need for new code, the same code will work. Enter it in the same location
– https://www.screencast.com/t/LODZdgMWd
– https://www.screencast.com/t/whII9Qm3SWUf
The author name will be displayed as a class on the author box
– https://www.screencast.com/t/A8AJ8SQwe
This can then be used the same as before. Try it like this and it should work.
Thanks