How to enable reactions only for certain categories?

This worked surprisingly well, thank you very much for this approach.