Term Meta
-
I’m playing around with getting WP_Meta_Query to work with a ‘termmeta’ table.
I have it adding $wpdb->termmeta since WP Meta Query looks for the table there like $wpdb->{$meta_type}meta
$wpdb->termmeta = $wpdb->table_prefix . 'termmeta'; $wpdb->tables[] = 'termmeta';
Then I could rip-off the template functions from post.php like:
function add_term_meta($term_id, $meta_key, $meta_value, $unique = false) { return add_metadata('term', $term_id, $meta_key, $meta_value, $unique); }
and all the rest… except the tricky get_term_custom ones.
From everything I’ve looked at in meta.php this should work. Except it’s not. Nothings getting inserted/updated.
Anyone see any issues as to why this wouldn’t work.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Term Meta’ is closed to new replies.