Claude Repeater Test – Section & Styles

‘group_claude_fields_001’,
‘title’ => “Claude’s Fields”,
‘fields’ => array(
array(
‘key’ => ‘field_claude_tab_001’,
‘label’ => “Claude’s Fields”,
‘name’ => ”,
‘type’ => ‘tab’,
‘placement’=> ‘top’,
‘endpoint’ => 0,
),
array(
‘key’ => ‘field_claude_repeater_001’,
‘label’ => ‘Claude Repeater Test’,
‘name’ => ‘claude_repeater_test’,
‘type’ => ‘repeater’,
‘layout’ => ‘block’,
‘button_label’ => ‘Add Row’,
‘sub_fields’ => array(
array(
‘key’ => ‘field_claude_icon_001’,
‘label’ => ‘Icon’,
‘name’ => ‘icon’,
‘type’ => ‘text’,
),
array(
‘key’ => ‘field_claude_label_001’,
‘label’ => ‘Label’,
‘name’ => ‘label’,
‘type’ => ‘text’,
),
array(
‘key’ => ‘field_claude_content_001’,
‘label’ => ‘Content’,
‘name’ => ‘content’,
‘type’ => ‘textarea’,
‘new_lines’=> ‘wpautop’,
),
array(
‘key’ => ‘field_claude_status_001’,
‘label’ => ‘Status’,
‘name’ => ‘status’,
‘type’ => ‘radio’,
‘choices’ => array(
‘hide’ => ‘Hide’,
‘active’ => ‘Active’,
),
‘default_value’ => ‘hide’,
‘layout’ => ‘vertical’,
),
),
),
),
‘location’ => array(
array(
array(
‘param’ => ‘page_template’,
‘operator’ => ‘==’,
‘value’ => ‘page-home.php’,
),
),
),
‘menu_order’ => 0,
‘position’ => ‘normal’,
‘style’ => ‘default’,
‘label_placement’ => ‘top’,
‘instruction_placement’ => ‘label’,
‘hide_on_screen’ => ”,
));
}
}

// 2. Output the claude-test-sec section after Section 1 on the home page
add_action(‘claude_after_section1’, ‘claude_render_repeater_section’);
function claude_render_repeater_section() {
global $post;
if ( ! $post || $post->ID != 499 ) return;

$rows = get_field(‘claude_repeater_test’, $post->ID);
if ( ! $rows ) return;

echo ‘

‘;
echo ‘

‘;
foreach ( $rows as $row ) {
if ( isset($row[‘status’]) && $row[‘status’] === ‘hide’ ) continue;
echo ‘

‘;
echo ‘

‘;
if ( ! empty($row[‘icon’]) ) echo ‘

‘ . $row[‘icon’] . ‘

‘;
if ( ! empty($row[‘label’]) ) echo ‘

‘ . esc_html($row[‘label’]) . ‘

‘;
if ( ! empty($row[‘content’]) ) echo ‘

‘ . esc_html($row[‘content’]) . ‘

‘;
echo ‘

‘;
}
echo ‘

‘;
}

// 3. Inject the CSS for .usp-claude-test and its span
add_action(‘wp_head’, ‘claude_test_styles’);
function claude_test_styles() {
echo ‘

‘;
}

Status

a:15:{s:4:”type”;s:5:”radio”;s:12:”instructions”;s:0:””;s:8:”required”;i:0;s:17:”conditional_logic”;i:0;s:7:”wrapper”;a:3:{s:5:”width”;s:0:””;s:5:”class”;s:0:””;s:2:”id”;s:0:””;}s:7:”choices”;a:2:{s:4:”hide”;s:4:”Hide”;s:6:”active”;s:6:”Active”;}s:13:”default_value”;s:4:”hide”;s:6:”layout”;s:8:”vertical”;s:10:”allow_null”;i:0;s:16:”other_choice”;i:0;s:14:”save_other_choice”;i:0;s:4:”name”;s:6:”status”;s:3:”key”;s:24:”field_claude_status_001″;s:5:”label”;s:6:”Status”;s:10:”menu_order”;i:3;s:6:”parent”;s:26:”field_claude_repeater_001″;}

Content

a:13:{s:4:”type”;s:8:”textarea”;s:12:”instructions”;s:0:””;s:8:”required”;i:0;s:17:”conditional_logic”;i:0;s:7:”wrapper”;a:3:{s:5:”width”;s:0:””;s:5:”class”;s:0:””;s:2:”id”;s:0:””;}s:13:”default_value”;s:0:””;s:11:”placeholder”;s:0:””;s:4:”rows”;s:0:””;s:12:”new_lines”;s:4:”wpautop”;s:4:”name”;s:7:”content”;s:3:”key”;s:25:”field_claude_content_001″;s:5:”label”;s:7:”Content”;s:10:”menu_order”;i:2;s:6:”parent”;s:26:”field_claude_repeater_001″;}

Label

a:14:{s:4:”type”;s:4:”text”;s:12:”instructions”;s:0:””;s:8:”required”;i:0;s:17:”conditional_logic”;i:0;s:7:”wrapper”;a:3:{s:5:”width”;s:0:””;s:5:”class”;s:0:””;s:2:”id”;s:0:””;}s:13:”default_value”;s:0:””;s:11:”placeholder”;s:0:””;s:7:”prepend”;s:0:””;s:6:”append”;s:0:””;s:4:”name”;s:5:”label”;s:3:”key”;s:23:”field_claude_label_001″;s:5:”label”;s:5:”Label”;s:10:”menu_order”;i:1;s:6:”parent”;s:26:”field_claude_repeater_001″;}

Icon

a:14:{s:4:”type”;s:4:”text”;s:12:”instructions”;s:0:””;s:8:”required”;i:0;s:17:”conditional_logic”;i:0;s:7:”wrapper”;a:3:{s:5:”width”;s:0:””;s:5:”class”;s:0:””;s:2:”id”;s:0:””;}s:13:”default_value”;s:0:””;s:11:”placeholder”;s:0:””;s:7:”prepend”;s:0:””;s:6:”append”;s:0:””;s:4:”name”;s:4:”icon”;s:3:”key”;s:22:”field_claude_icon_001″;s:5:”label”;s:4:”Icon”;s:10:”menu_order”;i:0;s:6:”parent”;s:26:”field_claude_repeater_001″;}

Claude Repeater Test

a:18:{s:4:”type”;s:8:”repeater”;s:12:”instructions”;s:0:””;s:8:”required”;i:0;s:17:”conditional_logic”;i:0;s:7:”wrapper”;a:3:{s:5:”width”;s:0:””;s:5:”class”;s:0:””;s:2:”id”;s:0:””;}s:9:”collapsed”;s:0:””;s:6:”layout”;s:5:”block”;s:8:”min_rows”;s:0:””;s:8:”max_rows”;s:0:””;s:12:”button_label”;s:7:”Add Row”;s:10:”sub_fields”;a:0:{}s:13:”default_value”;s:0:””;s:4:”name”;s:20:”claude_repeater_test”;s:3:”key”;s:26:”field_claude_repeater_001″;s:5:”label”;s:20:”Claude Repeater Test”;s:10:”menu_order”;i:1;s:6:”parent”;s:26:”group_claude_fields_001″;s:2:”id”;s:26:”field_claude_repeater_001″;}

Claude’s Fields

a:16:{s:4:”type”;s:3:”tab”;s:12:”instructions”;s:0:””;s:8:”required”;i:0;s:17:”conditional_logic”;i:0;s:7:”wrapper”;a:3:{s:5:”width”;s:0:””;s:5:”class”;s:0:””;s:2:”id”;s:0:””;}s:9:”placement”;s:3:”top”;s:8:”endpoint”;i:0;s:13:”default_value”;s:0:””;s:4:”name”;s:0:””;s:3:”key”;s:20:”field_claude_tab_001″;s:5:”label”;s:15:”Claude’s Fields”;s:10:”menu_order”;i:0;s:6:”parent”;s:26:”group_claude_fields_001″;s:8:”required”;i:0;s:5:”order”;i:0;s:2:”id”;s:20:”field_claude_tab_001″;}