How can I apply an ACF field to a single custom post if it refers to the taxomy of that post type in the rules?

need to hide a div inside custom posts in a given category. I created an ACF True/False field and applied it to the category taxonomy for this post type. But this True/false should work on internal records that refer to the selected category to which ACF True/false is applied. I understand that there must be something like this ... but what exactly, I do not know) :

$terms= something here that I don't know..) ;
?php if ( 'yes' == get_field('name_field',$terms)): ?

....

PS: Perhaps I'm not entirely competent of the above. The logic is this: I check the box, inside the category, that I need to hide the div, in all case records associated with this category, the div is hidden.

Topic advanced-custom-fields Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.