Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Custom Post Type Taxonomie Archive Error 404 WordPress


You probably could of guessed I would have ended up here for this, because of all the taxonomy help I've had.


When I click on a taxonomy link (generated via get_the_term_list), I get the dreaded 404. When I should be getting my archive template?

I guess I've missed a trick somewhere... but first I'm using the archive.php for all my archives. Is this a problem? I thought wordpress worked by a template hierarchy so all types of archives would revert to the archive.php if no alternative template exists?

Anyway this is my functions PHP, which is generating one custom post type '<strong>download</strong>' and two taxonomies for my custom post type. They are '<strong>group</strong>' which is hierarchical and '<strong>meta</strong>' which is non-hierarchical.

See full functions here... [[LINK href=""]][[/LINK]]

Find the registered taxonomies line 130

I seems like a common problem but can't find a simple solution.

Thanks in advance.

Answers (2)


John Cotton answers:

You should use a file call taxonomy-group.php.

If you want to reuse the code in archive.php, just include that file.


Josh Cranwell comments:

Ok I made a taxonomy-group.php and taxonomy-meta.php but still not working.

How do you mean "re-saved permalinks"?


John Cotton comments:

<blockquote>How do you mean "re-saved permalinks"?</blockquote>

Dashboard > Settings > Permalinks > Save

Peter also has a good point - I hadn't noticed that. In will work, but only for one of them (whichever is first in the rewrite rules...). If you don't ever want to have users browse by one or other of those tags, just set that one to rewrite => false.

If it still doesn't work, check what's actually happening by viewing one of the taxonomies from the dashboard (the view link under each value in the list). If it works, check what the URL is - that could be your problem.

If it doesn't work.....

John Cotton comments:

Dashboard > Settings > Permalinks > Save

This step is really important when using rewrites as it's the best way to get your rewrite into the list. If your rewrite isn't in the list, WP doesn't know how to handle your url....

Josh Cranwell comments:

Hi John,

Sorry didn't actually think you meant literally re-save permalinks.

Could not vision that actually working, but re-saved and bingo.



Peter Michael answers:

You're using the same rewrite for both taxonomies? I don't think that'll work ('rewrite' => array( 'slug' => 'downloads' ),).

Josh Cranwell comments:

Hmmm good idea but still no return on archive page.

I've even created taxonomy.php archive pages :-/

Peter Michael comments:

As John mentioned: try go to Settings->Permalinks and re-save the current settings.

Josh Cranwell comments:

bingo bango!

Josh Cranwell comments:


Peter Michael comments:

You're welcome. Add your vote for John pls, thanks.