Please, someone can help?! I'm fighting with this for weeks and nothing.... I'm quite new in wordpress and php...
There is a way to list taxonomy terms based on another taxonomy? OR If is possible to list taxonomies based on post category.
BUT, I'm doing this on homepage, not post page...
The function above retrieve my all my taxonomy terms, but how or where filter this?
function dox_get_list_terms( $taxonomy = 'category', $term_id, $number, $orderby = 'ID', $order = 'ASC', $hide = '0' ) {
global $dox_options;
$terms = array();
$terms = explode(',', $term_id);
$count = count( $terms );
$output = '';
foreach( $terms as $term ) {
if ($term >= 0) {
$options = get_terms( $taxonomy, 'number='.$number.'child_of='.$term.'&parent='.$term.'&hide_empty='.$hide.'&hierarchical=1&depth=1&orderby='.$orderby.'&order='.$order );
if (! is_wp_error($options) ) {
foreach ($options as $option) {
$output .= '<li>'. $option->name .'</li>';
}
}
}
}
}
return $output;
}