I cannot get the archive to show for the taxonomies
And in the comments you said:
I can’t get to example.com/lips
And similar to what I said here:
-
Taxonomies, unlike post types, do not have an archive page (which displays posts from all terms in the specific taxonomy), so it’s normal if you “can’t get to”
example.com/lips
orexample.com/eyes
, i.e.example.com/<taxonomy key>
. -
And secondly, taxonomy templates like
taxonomy-lips.php
actually rely upon the current taxonomy term, i.e. there has to be a term being queried in order for a taxonomy template to be used, and for functions likeis_tax()
to returntrue
. So remember, the query determines the template and not the other way round. And for exampleexample.com/lips/category-slug
worked (i.e.taxonomy-lips.php
was used) because there’s a term being queried which is the one with the slugcategory-slug
.
So no matter how many times you flush/regenerate the rewrite rules, taxonomies simply do not have an “all-terms” archive, only specific terms in the taxonomies. See @bosco‘s answer here if you’re interested in knowing more tech stuff about taxonomy’s “archive page”, which by default do not exist or not implemented in WordPress core.
I hope this answered your question, and if all you wanted to have is for the example.com/lips
and example.com/eyes
to display posts from all/any terms in the lips
/eyes
taxonomy, then an easy way is:
-
Create a custom Page (post of type
page
) and give it thelips
oreyes
slug. -
Assign a custom page template to that Page.
-
And then make a secondary/custom
WP_Query
query in that very template.