display condition based on post term and status
You are populating the $term variable with a multidimensional array, but type-and-value checking it (===) against a string. Second, you say terms are ‘des_1’ and ‘des_1’ (with underscore), but are checking for ‘des-1’ (with dash). wp_get_post_terms will return an array of term objects, so you should might be better of with has_term() for checking if … Read more