Opened 6 years ago

Closed 4 years ago

#4990 closed defect (bug) (fixed)

get_posts should allow multiple categories

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

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 6 years ago.

Download all attachments as: .zip

Change History (5)

comment:1   DD326 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.

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.

  • Component changed from General to Template
  • 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.