Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#4750 closed defect (bug) (fixed)

Category unions and intersections

Reported by: ryan's profile ryan Owned by: ryan's profile ryan
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.3
Component: General Keywords: taxonomy category
Focuses: Cc:

Description

Category unions, intersections, and exclusions are common queries. Let's add some private query vars to the main post query to make this easier. category__in, category__not_in, and category__and accept arrays of category ids. category__in queries posts that have any of the given categories. category__not_in exclude posts in the given categories. category__and queries posts that have all of the given categories. The public "cat" query var is parsed into category__in and category__not_in.

Attachments (1)

cat__in.diff (5.5 KB) - added by ryan 17 years ago.

Download all attachments as: .zip

Change History (2)

@ryan
17 years ago

#1 @ryan
17 years ago

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

(In [5873]) Category union and intersection query vars. fixes #4750

Note: See TracTickets for help on using tickets.