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

add_action for publish_post doesn’t work

No offense, but I think I’m agreeing with a commenter from your other question… You really need to read PHP, MySQL, and regular expression tutorials before you get into any of this. More importantly, you need to learn how to search a code base using regular expressions in your favorite editor, and understand the code … Read more

SQL error with custom query

Should be: $where .= ” AND voted > 1″; Other notes: instead of hardcoding table names you should use $wpdb->prefix . ‘post_votes’; instead of checking in global $_GET you should declare your filters as accepting two arguments and code functions accordingly, these filters pass as second argument object that contains all of query data. Like: … Read more