MySQL-inserted custom taxonomy term lead to 404, flush rewrites doesn’t help

EUREKA!

My taxonomy name is ‘store-category’. When i used ‘rewrite’ = true or ‘rewrite’ = array(‘slug’ => ‘category’) it was giving me a 404 error. When I changed it to ‘rewrite’ => array(‘slug’ => ‘group’) the problem just went away!

So, the problem turned out to be a rewrite conflict. WordPress had been looking for my store-categories within categories, hence the 404 error.

No idea how ‘store-category’ fits in (when rewrite is just set true), but obviously it caused the same problem.

So, SOLUTION: don’t use slugs that match default WP slugs; try changing your slug to something else.