Make WordPress Core

Opened 15 years ago

Closed 14 years ago

#10333 closed defect (bug) (fixed)

Pages in Search results with the_category() shows default category

Reported by: pavelevap's profile pavelevap Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Template Keywords: needs-patch
Focuses: Cc:


When using the_category() in Search results (search.php) in template, pages are shown with default category. That is nonsense, no category should be displayed. Tested with default theme, only search for something which contains default page, then you will see results with this page in category: Uncategorized.

Change History (4)

#1 @pavelevap
15 years ago

  • Cc pavelevap@… added

#2 @ryan
14 years ago

  • Milestone changed from 2.9 to 3.0

#3 @nacin
14 years ago

  • Keywords needs-patch added

This has new implications in 3.0. Some well-placed is_object_in_taxonomy() checks should do the trick.

#4 @markjaquith
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [14660]) Do not show dummy default category output when calling the_category on a post_type that does not support the category taxonomy (like pages). Fix TwentyTen theme to not display wrapping text if there are no categories. fixes #10333

Note: See TracTickets for help on using tickets.