2
Bitte helfen Sie mir diesen Code zu ändern, Elemente zu zeigen, dass ihre count = 0 und auch ich will Raum zwischen Namen hinzufügen undWie soll ich diesen Code ändern, um leere Regionen anzuzeigen?
$args = array('hide_empty=0');
$terms = get_terms('job_region', $args);
if (!empty($terms) && !is_wp_error($terms)) {
$count = count($terms);
$i = 0;
$term_list = '<ul class="statelist clearfix">';
foreach($terms as $term) {
$i++;
$term_list. = '<li count-all='.$term - > count.
'><a href="/job-search/?location='.$term - > name.
'&submit=true" title="'.esc_attr(sprintf(__('نمایش آگهی های %s', 'my_localization_domain'), $term - > name)).
'">'.$term - > name.
'('.$term - > count.
')'.
'</a></li>';
if ($count != $i) {
$term_list. = " ";
} else {
$term_list. = '</ul>';
}
}
echo $term_list;
}