add_rewrite_rule only works when flush first
Problem with rules occurs, because rule for a given projecttype is added when you visit relevant URL. Every time you visit one of projects/{projectstype}/ addresses and flush rewrite rules, they are deleted and only one rule (only for current project type) is saved/created. You can add your code to request filter hook, then there is … Read more