y tengo esto
Código PHP:
//Añadir filtros para las taxonomías
function taxonomy_filter_restrict_manage_posts() {
global $typenow;
if ( $typenow == 'videofemucor' ) {
$filters = get_object_taxonomies( $typenow );
foreach ( $filters as $tax_slug ) {
$tax_obj = get_taxonomy( $tax_slug );
wp_dropdown_categories( array(
'show_option_all' => __('Mostrar todas las categorias' ),
'show_option_none' => '',
'taxonomy' => $tax_slug,
//'name' => $tax_obj->name,
'name' => $tax_slug,
'id' => $tax_obj->id,
'orderby' => 'name',
'order' => 'ASC',
'selected' => $_GET[$tax_slug],
'hierarchical' => $tax_obj->hierarchical,
'show_count' => true,
'hide_empty' => true
) );
}
}
}
add_action( 'restrict_manage_posts', 'taxonomy_filter_restrict_manage_posts' );
function taxonomy_filter_post_type_request( $query ) {
global $pagenow, $typenow;
if ( 'edit.php' == $pagenow ) {
$filters = get_object_taxonomies( $typenow );
foreach ( $filters as $tax_slug ) {
$var = &$query->query_vars[$tax_slug];
if ( isset( $var ) ) {
$term = get_term_by( 'term_id', $var, $tax_slug );
$var = $term->name;
}
}
}
}
add_filter( 'parse_query', 'taxonomy_filter_post_type_request' );