Make WordPress Core

Opened 8 years ago

Last modified 5 years ago

#39443 new defect (bug)

Search Page Template the_category() bug

Reported by: cybentizen's profile 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)

#1 @bhargavbhandari90
8 years ago

  • Keywords needs-screenshots added

#2 @Howdy_McGee
5 years ago

  • Keywords dev-feedback added

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 to the_category(). Not sure if this change is wanted or necessary. We would likely need an additional parameter to pass all the way down to wp_get_object_terms().

Version 0, edited 5 years ago by Howdy_McGee (next)

This ticket was mentioned in Slack in #core by howdy_mcgee. View the logs.


5 years ago

Note: See TracTickets for help on using tickets.