slug} = get_term_by('slug', $term->slug, 'product_cat'); ${$term->slug.'_array'} = (array)${$term->slug}; ${$term->slug.'_array_id'} =${$term->slug.'_array'}['term_id']; }; // luego genero unos argumentos para cada bloque de nombres que quiero separar $args = array( 'taxonomy' => 'product_cat', 'orderby' => 'name', 'show_count' => true, 'pad_counts' => false, 'hierarchical' => true, 'title_li' => '', 'hide_empty' => 0, 'show_option_all' => 'Ver todo', 'exclude' => array( $ropa_array_id, $seda_array_id ) ); $args_seda = array( 'taxonomy' => 'product_cat', 'orderby' => 'name', 'show_count' => true, 'pad_counts' => false, 'hierarchical' => true, 'title_li' => '', 'hide_empty' => 0, 'exclude' => array( $ediciones_array_id, $objetos_array_id, $ropa_array_id ) ); $args_ropa = array( 'taxonomy' => 'product_cat', 'orderby' => 'name', 'show_count' => true, 'pad_counts' => false, 'hierarchical' => true, 'title_li' => '', 'hide_empty' => 0, 'exclude' => array( $ediciones_array_id, $objetos_array_id, $seda_array_id ) ); ?>