you can filter about taxonomie
// to filter by category
function restrict_manage_posts() {
global $typenow;
if ( FB_CPT_POST_TYPE_1 == $typenow ) {
$args = array('orderby' => 'count', 'hide_empty' => true);
echo $this->get_taxonomy_html_select(FB_CPT_TAXONOMY_TYPE_1, $args);
}
}
function get_taxonomy_html_select($taxonomy_name, $args) {
$taxonomy = get_taxonomy($taxonomy_name);
$terms = get_terms($taxonomy_name, $args);
$label = __( 'Show all ' . $taxonomy->label, FB_CPT_TEXTDOMAIN );
$html = array();
$html[] = '<select style="min-width:155px;" id="' . $taxonomy_name . '" name="' . $taxonomy_name . '" class="postform">';
$html[] = '<option value="0">' . $label . '</option>';
if ( isset($_GET[$taxonomy_name]) )
$this_term = $_GET[$taxonomy_name];
else
$this_term = '';
foreach($terms as $term) {
$default = ( $this_term == $term->term_id ? ' selected="selected"' : '' );
$value = esc_attr($term->name);
$value = $value . ' (' . (int)$term->count . ')';
$html[] = "\t" . '<option value="' . $term->term_id . '"' . $default . '>' . $value . '</option>';
}
$html[] = '</select>' . "\n";
return implode( "\n", $html );
}
function request($request) {
global $pagenow;
if ( is_admin() && 'edit.php' == $pagenow && isset( $request[FB_CPT_TAXONOMY_TYPE_1] ) && FB_CPT_POST_TYPE_1 == $request[FB_CPT_TAXONOMY_TYPE_1] ) {
$request['taxonomy'] = FB_CPT_TAXONOMY_TYPE_1;
$request['term'] = get_term($request[FB_CPT_TAXONOMY_TYPE_1], FB_CPT_TAXONOMY_TYPE_1)->name;
unset($request['name']);
}
return $request;
}
use this hooks
// to filter custom post type per custom taxonomy
add_action( 'restrict_manage_posts', array( &$this, 'restrict_manage_posts') );
add_action( 'request', array( &$this, 'request' ) );