Use hook tableon_profile_extend.
Example: add next code to file functions.php of the current WordPress theme
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | add_action('tableon_profile_extend', function($profile, $action_name) { if ($action_name === 'tableon_default_tables') { $meta_key = 'my_global_column';//important! $meta_data = [ 'title' => TABLEON_Vocabulary::get('My meta column'), 'meta_key' => $meta_key, 'meta_type' => 'text', //text, number, calendar ]; $profile[$meta_key] = tableon()->columns->meta->assemble_meta_for_system($meta_data); } return $profile; }, 10, 2); |
In code replace your meta key in variable $meta_key and change column title (My meta column).
Make your attention on metadata types:
- text
- number
- calendar