get_term does not return the term

I am using my own taxonomy which has in the table terms corresponding row with a term. I need to get the term by term_id using get_term(141) but i get error invalid_taxonomy. I think that the relationships are correct because this query If WordPress is not aware of a taxonomy and you try to grab … Read more

How can I replace the values in WP_Term?

To replace values in a WP_Term object, you can modify its properties directly. For example: $term = get_term( $term_id, $taxonomy ); if ( ! empty( $term ) && ! is_wp_error( $term ) ) { $term->name=”New Term Name”; $term->slug = ‘new-term-slug’; $term->description = ‘New Term Description’; } In this example, the get_term() function is used to … Read more