Make WordPress Core

Opened 17 years ago

Closed 16 years ago

Last modified 7 years ago

#1486 closed defect (bug) (fixed)

get_pages() filtering by page author [PATCH]

Reported by: skippy's profile skippy Owned by: ryan's profile ryan
Milestone: 2.1 Priority: normal
Severity: normal Version: 1.6
Component: Template Keywords: bg|has-patch bg|commit
Focuses: Cc:


Attached is a patch that supports a new '&authors=' parameter to get_pages() and wp_list_pages(). It accepts a comma-seperated list of author IDs or author login names (and you can mix-and-match names and IDs in the parameter).


I think this will be an extremely useful addition for multi-author blogs, as it allows better control over templating.

Attachments (3)

template-functions-post.patch (737 bytes) - added by skippy 17 years ago.
add '&authors=' parameter to get_pages() and wp_list_pages()
1486.patch (1.4 KB) - added by skippy 17 years ago.
1486.diff (2.4 KB) - added by westi 16 years ago.
Patch updated against current trunk

Download all attachments as: .zip

Change History (8)

17 years ago

add '&authors=' parameter to get_pages() and wp_list_pages()

#1 @ryan
17 years ago

  • Owner changed from anonymous to ryan

17 years ago

#2 @davidhouse
16 years ago

  • Keywords bg|commit bg|needs-testing added

Might as well commit this, but it would be nice if someone could test it first.

#3 @ryan
16 years ago

Update patch for latest trunk.

16 years ago

Patch updated against current trunk

#4 @westi
16 years ago

  • Component changed from General to Template
  • Keywords bg|2nd-opinion bg|needs-testing removed
  • Milestone set to 2.1

I have updated skippys patch to run against current trunk:

  1. Removed the inline query and used a builtin db abstraction functions
  2. Removed the use of the non-existant next inside the foreach loop

#5 @ryan
16 years ago

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

(In [4180]) Get pages by author[s]. Props westi. fixes #1486

Note: See TracTickets for help on using tickets.