function show_SocialProfiles() { $icon_type = get_field('type_of_icon', 'options'); return displaySocialProfiles($icon_type, 'shortcode'); }
<?php $page_for_posts = get_option('page_for_posts'); $postid = get_the_ID(); $item_id = is_blog() ? $page_for_posts : $postid; $icon_type = get_sub_field('icon_type', $item_id); $custom_class = get_sub_field('custom_class', $item_id) ? ' ' . get_sub_field('custom_class', $item_id) : ''; echo displaySocialProfiles($icon_type, $custom_class);