Opened 15 years ago
Closed 14 years ago
#13889 closed enhancement (duplicate)
permalinks for 'hierarchical' custom taxonomies do not behave hierarchically - is this correct?
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | |
Focuses: | Cc: |
Description
with conventional Categories, the permalinks generated and recognised by WordPress reflect the true hierarchy – so you might have a parent category books, a subcategory fiction, a further subcategory novels, and so on, and a function like wp_list_categories would then generate the appropriate link /books/fiction/novels/ etc...
with custom taxonomies that have 'hierarchical = true', the behaviour is generally identical to Categories (eg. in the GUI). and yet the permalinks generated / accepted do not reflect the hierarchical structure – instead only one level appears to be accepted: either /books/fiction or /books/novels but not /books/fiction/novels etc...
I can't tell whether this is a bug or a feature, or understand why it would be different - nor could I find any reference to it after an extensive search. can anyone clarify?
the difference relates in part to the slightly different regular expressions for categories and custom taxonomies that turn up in rewrite rules, but I think it goes deeper than that, too.
thanks.
for 3.0, Yes, this is the current behaviour.
I'm sure theres another ticket for this, however, cant seem to find it right now.
I'll take care of it in 3.1, setting to Future Release for now until patch is available.
For now, You can implement it yourself for a taxonomy, See this code for an example (replace 'state' with your own taxonomy in all cases obviously) http://dd32.id.au/files/wordpress/example-hierarchical-term-links.php
For future sake, I'm attaching a copy of the file