How To Disable Author's Bio From Show On Specific Categories

Posted in: Newsmag
Post count: 46

Hi,

How can I disable author’s bio from displaying on certain categories?

If you can fix this feature in next update, it would be nice, site wide. So users can disable author’s profile per post.

Thanks

Post count: 6535

Hi

Thanks for the suggestion, I’ve added it on our list and we will consider it if we decide to improve the theme from this point of view. However I can’t promise anything as we have lots of request on our list and we must pick carefully what features will implement.
If you want to hide author’s description from posts within a specific category edit td_module_single_base.php file and add a condition like here: http://screencast.com/t/1fItRLWQd9n
To get the category ID follow this link: http://screencast.com/t/qUpU16WhSC0

Thanks!

Post count: 46

Sorry, it didn’t work.

Post count: 6535

Hi

If the post have multiple categories you need to add all categories ids in indicated function in order to hide the author descriptions. For example if you have five categories for a post the code will look like this:

    if ( ! in_category(array('id1','id2','id3','id4','1d5'))) {
                $buffy .= '<div class="td-author-description">';
                $buffy .= get_the_author_meta('description', $author_id);
                $buffy .= '</div>';
            }

Thanks!

  • This reply was modified 10 years by Andrei L..
Post count: 46

thanks

Post count: 25

Hi Andrei,

Does this solution needs to have a child theme ?
Or no problem when I will update Newsmag ?

Thanks,

Post count: 6535

Hi

The above solution won’t work in child theme as td_module_single_base.php file can’t be edited via child theme. Here you can check all files which can be edited with child theme: https://forum.tagdiv.com/newsmag-child-theme-support/ Also when you update the theme all customizations will be lost as the old files are deleted and new theme files are added instead. You will have to keep track your customizations and re-add them again after each theme update.

Thanks!

Post count: 25

Thank you for your answer.

If I can’t use a child theme for this, it’s not very comfortable to do it again and again each time your theme is updated…

Do you think that a future update could include a kind of integrated customizations for individual posts or categories ? I saw a lot of requests on the forum about this.
According to the project, it’s very useful to put on or off some SEO or layouts attributes.
Your theme could reach the perfection with that !
😉

Post count: 6535

Hi

We certainly plan to extend the theme flexibility in the future updates. I’ve added your suggestion on our list and when the time comes our developers will consider it. This may take some time because we have a long implementation list and we take them one by one.

Thanks for your suggestion, have a nice day.

Viewing 9 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic.