I have a custom taxonomy called book
with terms: 'science fiction', 'romantic', 'history'
Each of these Taxonomies have 4 sub-taxonomies, that I need to display as a sub navigation.
I'd like first to retrieve the current taxonomy of my page, and then display a list of these sub taxonomies.
for now I have this:
<?php
$taxonomy = 'book';
$orderby = 'name';
$show_count = 0; // 1 for yes, 0 for no
$pad_counts = 0; // 1 for yes, 0 for no
$hierarchical = 1; // 1 for yes, 0 for no
$title = '';
$empty = 0;
$args = array(
'taxonomy' => $taxonomy,
'orderby' => $orderby,
'show_count' => $show_count,
'pad_counts' => $pad_counts,
'hierarchical' => $hierarchical,
'title_li' => $title,
'hide_empty' => $empty
);
?>
<ul class="guide-navigation">
<?php wp_list_categories( $args ); ?>
</ul>
I need to get the current taxonomy of my page, to inject it in this code to list its sub-taxonomies. How can I do this?
book
is a taxonomy, everything underbook
taxonomy is called terms.