function listTerms($taxonomy) { // Query pages. $args = array('orderby' => 'term_order', 'depth' => 0, 'child_of' => 0, 'hide_empty' => 0); $taxonomy_terms = get_terms($taxonomy, $args); $output = ''; if (count($taxonomy_terms) > 0) { $output = TOwalkTree($taxonomy_terms, $args['depth'], $args); } echo $output; }
function listTags($taxonomy) { // $objCategoriaProjeto = get_term_by('slug', 'projetos', 'category'); // if ($objCategoriaProjeto){ $args = array('orderby' => 'term_order', 'depth' => 0, 'hide_empty' => 0); //$taxonomy = array('category', 'post_tag'); $taxonomy_terms = get_terms($taxonomy, $args); $output = ''; if (count($taxonomy_terms) > 0) { $output = TOwalkTree($taxonomy_terms, $args['depth'], $args); echo $output; } else { echo "Nenhum post relacionado as categorias informadas no arquivo |sp-config.php| variável |aryCategoriasOrdemExibicao|, foi encontrado."; } // }else{ // echo "Categoria projeto não encontrada."; // } }