Change the term based on the value of a $variable using wp_update_post in submitting a form

Your problem is this line: if (isset($_POST[‘call_16’]) == ‘No’ ) { isset() returns true or false based on whether the ‘call_16′ item exists in the $_POST array. It doesn’t return the value. So isset($_POST[‘call_16’]) is true, not ‘No’. If you want to check if it’s set and that it has a specific value (which you … Read more

I want to get term by term_name without taxonomy

The get_term() function does not accept a string or array; it only accepts an ID, a stdClass object or a WP_Term object. So I think you’re headed in the right direction using $wpdb. But the SQL query can’t accept a PHP array. So try this: $term_names = [‘red’,’blue’]; $term_names_str = implode(‘, ‘, $term_names); $term_datas = … Read more

get_the_term_list( get_the_ID() label formatting?

You can use HTML to mark it up however you’d like. You can use a <strong> tag to make it bold: $film_tags = get_the_term_list( get_the_ID(), ‘film_tags’, ‘<strong>Tags:</strong> ‘, ‘, ‘, ” ); Or add a class to style with CSS: $film_tags = get_the_term_list( get_the_ID(), ‘film_tags’, ‘<span class=”tags-label”>Tags:</span> ‘, ‘, ‘, ” );