Just out of initial curiosity, have you flushed your permalinks to take the new post type and taxonomy into account? Just visit the permalinks page and hit save without changing settings.
Also, just to be certain things are registering correctly, do they work when you don’t have pretty permalinks enabled at all?
I did flush permalinks but my .htaccess file wasn’t writeable for some reason. That’s been adjusted and now I get http://domain.tld/materials/oak and http://domain.tld/material-type/wood/. Any way to combine the two to get http://domain.tld/materials/wood/oak or, to put it more generally, http://domain.tld/post-type/taxonomy/title?
Excellent, steps forwards.
For the last part, we’re getting into the rewrite API and how WordPress structures things, but I must admit we don’t have that level of customization built into CPTUI itself. It’s a complex topic really, and I don’t know it as well as I perhaps should. I’d end up googling around myself and doing trial/error to figure it out.
Ok… I don’t know why but I thought this was the entire point of custom post types. You go to Materials and see the categories, you click on the category and you see subcategories, you click on a subcategory and you see the items. I wonder if there’s an easy solution to this. I guess I’ll just end up coding my own pages.
Well, the issue is the url structure that is represented and you see in the browser address bar, not so much what links you’re clicking on in different pages. It’s definitely possible, but even when registering post types via your theme, you wouldn’t get those structures without some extra work.
Sorry to resurrect this thread… I need to bounce some questions off someone and you seem to know what you’re doing. π
I have a custom taxonomy setup now called ‘organic’ and I want to create a page that lists out everything under that taxonomy. Under ‘organic’, I have child taxonomies called ‘wood’, ‘stone’, ‘marble’, etc. According to the WP docs/codex, I should be able to create these pages:
taxonomy-organic.php – A listing page that lists out all the organic materials.
taxonomy-organic-wood.php – A listing of all the materials in the wood taxonomy.
taxonomy-organic-stone.php – A listing of all the materials in the stone taxonomy.
Unfortunately, I’ve refreshed my permalinks (saved with no changes) and I’m getting a 404 when I go to http://domain.tld/organic/ or any of the sub-endpoints.
Any ideas why that might not be working?
For as long as I’ve ever known, WordPress doesn’t have support for an “all terms in taxonomy” archive like they do posts in a post type. They DO support archives by term.
http://domain.tld/organic/wood/ would show all posts for the “Wood” term, etc
http://domain.tld/organic/ would not work.
Someone would need to dig in deeper why the /organic/wood/ part is not returning anything. Best first guess I have is no posts assigned yet.
Hmm… Ok. This is what I was basing that off of: https://developer.wordpress.org/themes/template-files-section/taxonomy-templates/
I thought that I could create a taxonomy-organic.php and customize that page to list the sub-categories under that.
This whole thing seems like kind of a mess. I can’t believe it’s this cumbersome to get the structure I’m looking for. Thanks for the help. Your plugin is invaluable.
Unless I’m mistaken, taxonomy-{taxonomy}.php would be used for any term in $taxonomy, but doesn’t mean there’s an all-terms-in-taxonomy archive available out of box once a taxonomy is registered.