Hello,
I made a function that checks for articles based on the posttype sent.
function icey_get_job_term_count($taxonomy = 'job_category') {
global $post;
if (!$post) {
return 0;
}
$terms = get_the_terms($post->ID, $taxonomy);
return ($terms && !is_wp_error($terms)) ? count($terms) : 0;
}
And i want to hide a section if the return is 0.
I set the condition in bricks like this:
But it doesn’t hide the section at all…I tested the Echo inside the component and the value returns 0 if there are no posts.
Also i’ve tried with: “>”, “Does not contain”, “!=”…
And i still can’t hide the section
What could be the problem?