There is a category setting that might work for that:
If you need to change the code, you should make your changes in a plugin. Making changes to the core code will cause you problems in the future.