Make WordPress Core

Opened 17 years ago

Closed 15 years ago

#4990 closed defect (bug) (fixed)

get_posts should allow multiple categories

Reported by: filosofo's profile filosofo Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.3
Component: Template Keywords: get_posts category has-patch
Focuses: Cc:

Description

get_posts assumes that one is requesting only one category, unlike query_posts. My patch allows you to get multiple categories.

Attachments (1)

get_posts_cats.diff (2.0 KB) - added by filosofo 17 years ago.

Download all attachments as: .zip

Change History (5)

#1 @DD32
17 years ago

This is a dupe of #4943, however i like this patch better than the other one, so i'm going to leave them both open.

#2 @filosofo
17 years ago

I saw #4943 but decided to submit this patch anyways, because 4943's patch adds new features (category_exclude) and doesn't sanitize the category ids.

#3 @santosj
16 years ago

  • Component changed from General to Template

#4 @filosofo
15 years ago

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

fixed a while back when get_posts started using WP_Query

Note: See TracTickets for help on using tickets.