I want to be able to customize the WordPress edit posts screen to filter based on a custom field (or whatever).
Unfortunately I’m not sure what filter or hook to use here, and instead of opening the code myself, figured I’d throw the question out here.
Just to be clear, I’m talking about this screen. Essentially I want to be able to add a new “tab” next to Drafts, Pending, etc.
Update
After testing this, here’s the solution:
add_filter( 'parse_query', 'filter_post_edit_screen' );
function filter_post_edit_screen($query) {
global $pagenow;
if (is_admin() && $pagenow=='edit.php'){
$query->query_vars['category__not_in'] = array(120,9999);
}
return $query;
}
That’s it. Just paste that into a plugin. Obviously you’d tweak the category IDs or add some more substantial code.
You need a to use a few hooks for that
take a look at mike’s answer to a similar question.
Hope this Helps
I found a plugin that might be a solution to your problem: http://wordpress.org/extend/plugins/extended-admin-post-filter/installation/
If that doesn’t work then I think the only way out is to edit the WP core files (not recommended though) for the Edit Posts View & add a tab which filters posts according to the category or tag. This should work for sure! 🙂