• Resolved Dankicity

    (@dankicity)


    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)
  • Thread Starter Dankicity

    (@dankicity)

    Damn it, why is it only AFTER I spend 4 hours looking for and then trying to solve something that I find the search result I was looking for…

    Taxonomy Meta Plugin

    Submitted this question:$wpdb->termmeta since WP Meta Query looks for the table there like $wpdb->{$meta_type}meta, I thought for a long time, has not been resolved, thank you in get help.
    [link removed]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Term Meta’ is closed to new replies.