Make WordPress Core

Opened 16 years ago

Closed 14 years ago

#6459 closed defect (bug) (invalid)

Pages get the ID of the Default Post Category, conflict with in_category template tag

Reported by: pozhonks's profile PozHonks Owned by: ryan's profile ryan
Milestone: Priority: normal
Severity: normal Version: 2.5
Component: Taxonomy Keywords: pages category term_taxonomy_id
Focuses: Cc:


Pages are marked with the term_taxonomy_id of the Default Post Category ID.
If the Default Post Category ID is 8, in a template, when I use the in_category(8) template tag in the Loop and displaying a Page, the in_category(8) template tag is activated, thus showing what is reserved to posts belonging to category ID 8.
Pages should get a term_taxonomy_id = 0 or nothing.

Change History (4)

#1 @ryan
16 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

#2 @Denis-de-Bernardy
15 years ago

  • Component changed from General to Taxonomy
  • Owner changed from anonymous to ryan

this isn't valid any longer, is it?

#3 @jahoog
15 years ago

I have had this happen in 2.8.4. The default post category id was added to a new page created. So it double highlighted a menu item because it thought it was current_cat. Fixed it by removing default category and recreated the page for my situation.

#4 @ryan
14 years ago

  • Milestone 2.9 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Running in_category() on a page is meaningless.

Note: See TracTickets for help on using tickets.