Add a hide_empty
argument:
$termsq = get_terms("competence",array('hide_empty'=>false));
See the Codex for the complete argument list.
Additionally, get_terms
will return a WP_Error
object on failure, so your count
check won’t work. You need is_wp_error
.
$termsq = get_terms("competence",array('hide_empty'=>false));
if (!is_wp_error($termsq)) {
echo "<ul>";
foreach ( $termsq as $termq ) {
echo "<li>" . $termq->name . "</li>";
}
echo "</ul>";
}