Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $args = array('post_type' => 'infoicons');
- $query = new WP_Query($args);
- if ( $query->have_posts() ) {
- while ( $query->have_posts() ) {
- $query->the_post();
- $infoicons = get_field_object( "field_589c59fabc9df", $post->ID );
- $tpl = '';
- $tpl_inner = '';
- foreach ($infoicons['value'] as $key => $infoicon) {
- //var_dump($infoicon['field_icons__text']);
- $tpl_inner .= '<li>';
- $tpl_inner .= '<img src='.$infoicon['field_icons__img'].'>';
- $tpl_inner .= $infoicon['field_icons__text'];
- $tpl_inner .= '</li>';
- }
- }
- };
- $tpl .= '<h2 class="infoicons_heading">Коротко о главном:</h2>';
- $tpl .= '<ul class="infoicons_wrapper clearfix">';
- $tpl .= $tpl_inner;
- $tpl .= '</ul>';
- echo $tpl;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement