Opened 8 years ago
Last modified 5 years ago
#39443 new defect (bug)
Search Page Template the_category() bug
Reported by: | cybentizen | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Posts, Post Types | Keywords: | needs-screenshots dev-feedback |
Focuses: | Cc: |
Description
Suppose If I've selected three categories following a structure HR -> Reports -> Daily Reports.
Single.php shows the structure in the right way but when I use the same the_category () function inside Search template then it shows the different result. Rather than showing it in the default structure, it shows it like Daily Reports -> HR -> Reports. In search template the structure changes to order by name. The_category working perfectly in other pages.
Change History (3)
Note: See
TracTickets for help on using
tickets.
Reverting back to 4.7 I don't see where it orders by hierarchy. It seems to order by Alpha always. In WordPress 4.9 there's the
wp_get_object_terms_args
filter hook which may circumvent this issue but there isn't anything specific tothe_category()
. Not sure if this change is wanted or necessary. We would likely need an additional parameter to pass all the way down towp_get_object_terms()
.