Thanks a lot! That’s superb!!
Hi
I’m using code similar to the code above, but I’m also wanting to display the number of jobs in each category. To do this, I’ve used $cat->count, which worked fine initially, but I noticed a problem.
When an application is made for a job, the $cat->count is increased by one here. Is there a way you can think of that I could just show the number of jobs in the category? Here is the code in essence of what I have now…
$categories = get_terms( 'jobman_category', 'hide_empty=0' );
foreach( $categories as $cat ) {
$count = ' (' . $cat->count . ')';
echo "<li><a href='" . get_term_link( $cat->slug, 'jobman_category' ) . "'>$cat->name<span>$count</span></a></li>";
}
Thanks in advance