Add dynamic text in the post and according to post category/tag to change

Hi there,

I know use the function add_post_content($content) can add dynamic text on every post, but their condition is if (is_single() || is_page()), which mean every post will add my dynamic text of setting. If I want to change the condition to each different category/tag will have their dynamic text, how can I change the condition?

Best regards