get value from ‘terms’ table

get_terms does indeed fetch from the terms table, but it does also use a join on the taxonomy table, since you need to specify which taxonomies you want terms for in your get_terms query. If you want to get all terms, you could use something like: $all_terms = get_terms([ ‘taxonomy’ => get_taxonomies(), ‘hide_empty’ => false, … Read more

update_term_meta not working

A terms slug is not stored as meta/custom fields, and it’s definitely not post meta, so update_term_meta and update_post_meta are innapropriate and can never be used to achieve your goal. The correct function is wp_update_term, however you’ve used that incorrectly too: $term->id isn’t a thing, if we look at the WP_Term class and the examples … Read more

Trash Bin for Categories?

i finded solution for this: add_filter( “cat_notice_row_actions”, ‘trash_row_actions’, 10, 2 ); function trash_row_actions( $actions, $user_object ) { // Remove the Edit action. unset( $actions[‘delete’] ); $catTrash = 10; $id = $user_object->term_id; $taxName = $user_object->taxonomy; $taxParent = $user_object->parent; // Add your custom action. $actions[‘update-parent’] = “<form action=’#’ method=’get’> <input type=”hidden” name=”taxonomy” value=”$taxName”> <input type=”hidden” name=”post_type” value=”noticia”> … Read more