I have a repeater field with 2 fields:
1) Social Icon is a select field set to return Both(Array) and I have added choices as follow
pc-facebook : Facebook
pc-instagram : Instagram
pc-snapchat : SnapChat
2) Social Link is a simple url field.
My function to display in the frontend
function pc_social_profiles(){
$social_profiles = get_option( 'options_pc_social_profiles');
if( $social_profiles ) :
for( $i = 0; $i < $social_profiles ; $i++ ) {
$social_icon = get_option( 'options_pc_social_profiles_' . $i . '_social_icon', false );
$social_link = get_option( 'options_pc_social_profiles_' . $i . '_social_link', false );
echo $social_icon.' - '.$social_link.'<br>';
}
endif;
}
Output is only shows the value of the select field not the label. But I use the default get_field and foreach loop it works. What am I missing?
Thanks