[wp-hackers] Custom page orders in edit pages menu?

Glenn Ansley glenn at glennansley.com
Tue Dec 1 02:18:58 UTC 2009

I didn't look at the code too extensively so there may be other places
to look as well, but the following (on line 32) means that it's only
firing off on the Edit Post screen (the screen that lists all the

if( $query->is_admin && ( 'edit.php' == $pagenow ) ) { ... }

You would need to make sure its checking for edit-pages.php as well.
And on a side note, is_admin() would probably be a cleaner solution
that $query->is_admin

Glenn Ansley

On Mon, Nov 30, 2009 at 6:27 PM, Matthew Gerring <mgerring at emrl.com> wrote:
> I've got kind of a sticky situation- I'm working on a site that has a bunch
> of custom taxonomies and metadata for pages (biographies, in this case) and
> my client wants to be able to sort the posts by the custom taxonomies or by
> custom fields in the backend. I found some code that will allow you to do
> that on the Edit Posts page, but not the Edit Pages page.
> Here's the code: http://wordpress.pastebin.com/m24f51530
> What changes would need to be made to allow this to work in the Pages edit
> screen? I looked for a pre_get_pages hook, but there apparently isn't one.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list