Use tab "Meta" in the table tools popup.
Also you can add it by code. Use next code in file functions.php:
1 2 3 4 5 6 7 8 9 10 11 12 13 | add_action('tableon_profile_extend', function($profile, $action_name) { $profile['hmeta_1'] = [ 'title' => TABLEON_Vocabulary::get('Meta 1'), 'order' => 'asc', 'display' => false, //display in fields list in the settings 'action' => function($post_id) { return get_post_meta($post_id, 'meta_1', true); } ]; return $profile; }, 10, 2); |
Trough code you can use custom columns in such shortcode [tableon id=49 columns='id,title,__price,hmeta_1']
Also for some tables it is possible to modificate results in the table cell:
1 2 3 4 5 6 7 8 | add_action('tableon_meta_data_cell', function($value, $meta_data, $post_id, $table_id) { if ($meta_data['meta_key'] === 'meta_1' AND $table_id === 21) { $value = floatval($value) * floatval(get_post_meta($post_id, 'meta_2', true)); } return $value; }, 10, 4); |
This code for table 21 in meta cell meta_1 will display results of a math operation.