i use option tree list item for getting social icon & links.but i cannot get data from backend.
array(
'id' => 'social_icon',
'label' => __( 'Footer Social Icons & links', 'theme-text-domain' ),
'desc' => __( '', 'theme-text-domain' ),
'std' => '',
'type' => 'list-item',
'section' => 'header_footer',
'rows' => '',
'post_type' => '',
'taxonomy' => '',
'min_max_step'=> '',
'class' => '',
'condition' => '',
'operator' => 'and',
'settings' => array(
array(
'id' => 'social_icon_fb',
'label' => __( 'link', 'theme-text-domain' ),
'desc' => '',
'std' => '',
'type' => 'text',
'rows' => '10',
'post_type' => '',
'taxonomy' => '',
'min_max_step'=> '',
'class' => '',
'condition' => '',
'operator' => 'and'
),
array(
'id' => 'social_icon_upl',
'label' => __( 'icon', 'theme-text-domain' ),
'desc' => 'the best sixe for icon is 31x31.',
'std' => '',
'type' => 'upload',
'rows' => '10',
'post_type' => '',
'taxonomy' => '',
'min_max_step'=> '',
'class' => '',
'condition' => '',
'operator' => 'and'
),
)
)
and i want to use this in
<ul id="icons">
<li>
<a href="<?php get_option_tree( 'social_icon_fb', '', 'true' ); ?>" class="normaltip" title="Facebook"><img src="<?php get_option_tree( 'social_icon_upl', '', 'true' ); ?>" alt=""></a>
</li>
</ul>
i use this to get data from backend.is this correct?? if no so what should be the code to get data.
Try this code
list item always return array. you have to use foreach loop for getting every row of array. code is describe bellow.