WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get the page parent dropdown (in page attributes) to show only pages that have been published by the author of the current page.

This doesn't seem to work :

add_filter( 'page_attributes_dropdown_pages_args', 'mwm_show_only_author_pages_in_attributes' );
add_filter( 'quick_edit_dropdown_pages_args', 'mwm_show_only_author_pages_in_attributes' );

function mwm_show_only_author_pages_in_attributes( $args ) {

    global $post;

    $args['author'] = $post -> post_author;

    return $args;

What am I doing wrong here ?

share|improve this question
up vote 2 down vote accepted

From the source code the function wp_dropdown_pages uses get_pages() and this function uses different attributes than WP_Query or get_posts(). It uses authors instead of author.

Note from the codex:

authors (string) Only include the Pages written by the given author(s) Note: get_posts() uses the parameter 'author' instead of 'authors'.

share|improve this answer
Thanks david, I should really look at the source more often. – mike23 Mar 14 '13 at 11:31
No problem, glad to help you. – david.binda Mar 14 '13 at 12:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.