Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/03/2013, 20:15
Avatar de engonga
engonga
Usuario no validado
 
Fecha de Ingreso: marzo-2002
Ubicación: Buenos Aires
Mensajes: 1.300
Antigüedad: 22 años, 1 mes
Puntos: 8
Filtro en escritorio no funciona

hola tengo un filtro en un sistea de posts personalizados

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' ); 
pero hasta hace poco me funcioaba cuando seleccionaba una taxonomia y de daba a filtrar pero ahora no me funciona... y ya no se que hacer!!!!