Support » Fixing WordPress » Only one of my custom taxonomy archive page get 404 error

  • I created 3 custom taxonomy for a custom post type – state, city, and selling_type. I also created taxonomy-state.php, city-taxonomy.php and taxonomy-selling_type.php to be the archive page.

    Oddly, the taxonomy-state.php and taxonomy-selling_type.php are working, but only the city-taxonomy.php give 404 error.

    I use the same method to create and registered the taxonomies. I don’t what’s wrong with the “city”. The only differences between city and state/selling_type is, in the custom type, the city is using text input whereas state/selling_type is using dropdown to insert terms.

Viewing 3 replies - 1 through 3 (of 3 total)
  • It should be just a matter of editing your file name to be ‘taxonomy-city.php’. That is how WordPress explains it.

    SIDE NOTE: An issue I had was creating a taxonomy called ‘license’. For some reason, changing it to ‘licenses’ made it work. Might have been a core term already used by WP.

    Well, I just find out that was a typo in my question. I created taxonomy-city.php, which is not working in my wp.

    I found that their is a .xml generated in the permalink. It is not showed in the browser address bar, but I can see it in the error message:

    Not Found
    The requested URL /example/<strong>city.xml</strong>/new-york/ was not found on this server.

    If I change the the rewrite rule to false, the problem solve.

    I don’t know if the forum is adding the ‘strong’ tags, but I know in my recent experience I had to go to to the Permalinks settings and just hit the save button to fix these things.

    I believe you want rewrite to be true. I actually have them like this:
    ‘rewrite’ => array(‘slug’ => ‘licenses’)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Only one of my custom taxonomy archive page get 404 error’ is closed to new replies.