404 for a custom taxonomy?
You use the same slug publication for custom taxonomy and custom post type. Slug should be unique. Another thing (not related with 404) is the flush_rules. As you can read here flush on the init hook is bad idea. Important: Flushing the rewrite rules is an expensive operation, there are tutorials and examples that suggest … Read more