sorry i took a snippet b/c the function is about 100 lines of code...
so here's the whole function/array:
register_field_group(array (
'id' => '500862fc37b7d',
'title' => 'Shows',
'fields' =>
array (
0 =>
array (
'key' => 'field_4fe9f19a559cf',
'label' => 'Show',
'name' => 'show',
'type' => 'repeater',
'instructions' => '',
'required' => '0',
'sub_fields' =>
array (
0 =>
array (
'key' => 'field_4fe9f19a57228',
'label' => 'Title',
'name' => 'title',
'type' => 'relationship',
'post_type' =>
array (
0 => 'my_post_type',
),
'taxonomy' =>
array (
0 => 'categories:'. $show_id,
),
'max' => '1',
'order_no' => '0',
),
1 =>
array (
'key' => 'field_4fe9f19a5bf89',
'label' => 'Times',
'name' => 'times',
'type' => 'repeater',
'sub_fields' =>
array (
0 =>
array (
'key' => 'field_4fe9f19a5c5bc',
'label' => 'time',
'name' => time',
'type' => 'time_picker',
'timepicker_show_date_format' => 'false',
'timepicker_date_format' => 'mm/dd/yy',
'timepicker_time_format' => 'h:mm TT',
'timepicker_show_week_number' => 'false',
'order_no' => '0',
),
1 =>
array (
'key' => 'field_4fe9f19a5d95a',
'label' => 'fol',
'name' => 'fol',
'type' => 'true_false',
'message' => '',
'order_no' => '1',
),
),
'row_limit' => '',
'layout' => 'table',
'button_label' => 'Add Row',
'order_no' => '1',
),
),
'row_limit' => '',
'layout' => 'table',
'button_label' => 'Add Row',
'order_no' => '0',
),
),
'location' =>
array (
'rules' =>
array (
0 =>
array (
'param' => 'post_type',
'operator' => '==',
'value' => 'date',
'order_no' => '0',
),
1 =>
array (
'param' => 'post_type',
'operator' => '==',
'value' => 'ush_day_type',
'order_no' => '1',
),
),
'allorany' => 'any',
),
'options' =>
array (
'position' => 'normal',
'layout' => 'default',
'hide_on_screen' =>
array (
),
),
'menu_order' => 0,
));
So for some reason when i hardcode $show_id =1 it works but if involve this other function (the one mentioned initially-part of the wordpress api), it doesn't work. $show_id is empty so i didn't know if you guys knew why? i tested it on another page (with echo statement) and it shows 1 put i didn't know if had to do something special to it to make it work inside this function. ideally would like this function to be dynamic.
thanks so much