в PHP

Not a big article just simple advice how to fix problem with pretty permalinks and custom taxonomy.

Here is the background:
I have simple custom hierarhical taxonomy.

  1.  

And I’ve used pretty permalinks structure “Day and name”.
So when I tried to open /type/cookies I’ve got 404 error.
After some time of googling I finally found simple solution

  1. <?php flush_rewrite_rules(false);

You need to put this line below your register taxonomy code and it will work like a charm.