Support » Plugins and Hacks » Change the depth of parent dropdown list

  • Resolved tzeldin88

    (@tzeldin88)


    This is a response to http://wordpress.org/support/topic/change-the-depth-of-parent-dropdown-list?replies=1, but the Topic was already “closed”, so i couldn’t just reply to that post. (Why is that, by the way??)

    Filter the Parent dropdown (in Admin > Edit page > Page attributes), so it shows ONLY top-level pages. This makes it much easier to find the page you want, assuming your parent-page will always be a top-level page.

    add_filter('page_attributes_dropdown_pages_args','tz_parent_dropdown');
    function tz_parent_dropdown($dropdown_args){
    	$dropdown_args['depth'] = 1;
    	return $dropdown_args;
    }
  • The topic ‘Change the depth of parent dropdown list’ is closed to new replies.