Need HELP
-
I am trying to figure this out, and I have spent hours.
wp_list_categories
I have two of these on my archive page calling two different taxonomies:
(location and carelevel)1.)
<?php
$term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) );
if ($term->parent == 0) {
wp_list_categories(‘taxonomy=location&depth=1&show_count=0
&title_li=&child_of=’ . $term->term_id);
} else {
wp_list_categories(‘taxonomy=location&show_count=0
&title_li=&child_of=’ . $term->parent);
}
?>2.)
<?php
$term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) );
if ($term->parent == 0) {
wp_list_categories(‘taxonomy=carelevel&depth=1&show_count=0
&title_li=&child_of=’ . $term->term_id);
} else {
wp_list_categories(‘taxonomy=location&show_count=0
&title_li=&child_of=’ . $term->parent);
}
?>What I have noticed is this: Because I am calling two wp_list_categories of two different taxonomies It will only display one result of the taxonomy.
How do I get them to both display the taxonomy? It used to do it, but with all the updates WordPress has been doing, it no longer works.
The topic ‘Need HELP’ is closed to new replies.