Hello, i want to build a slide panel for my site that has a taxonomy terms in hierarchy and when the user click one of the terms it will take the user to the search form with the current term, i built the menu getting the terms and the taxonomy slug to generate the urls
the code that generates the list
echo '<nav id="slideFilters"><ul>';
foreach ($terms as $term) {
if ($term->parent < 1) {
echo '<li class="parent">';
echo '<a href="'.get_site_url().'/?sfid=225&_sft_ads_category='.$term->name.'">';
echo $term->name;
echo '</a>';
if (array_key_exists($term->term_id, $hierarchy)) {
echo '<ul>';
foreach ($hierarchy[$term->term_id] as $v) {
$child = get_term($v);
echo '<li>';
echo '<a href="'.get_site_url().'/?sfid=225&_sft_ads_category='.$child->slug.'">';
echo $child->name;
echo '</a>';
echo '</li>';
}
echo '</ul>';
}
echo '</li>';
}
}
echo '</ul></nav>';
so its something like this:
siteURL?sfid=225&_sft_ads_category=desmontes
The problem i get is that when i generate the search this way and click on the items to se the results, it doesnt get the number of post each taxonomy