Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. <?
  2. $args = array('post_type' => 'infoicons');
  3. $query = new WP_Query($args);
  4.  
  5.  
  6.  
  7. if ( $query->have_posts() ) {
  8. while ( $query->have_posts() ) {
  9. $query->the_post();
  10. $infoicons = get_field_object( "field_589c59fabc9df", $post->ID );
  11. $tpl = '';
  12. $tpl_inner = '';
  13.  
  14. foreach ($infoicons['value'] as $key => $infoicon) {
  15. //var_dump($infoicon['field_icons__text']);
  16. $tpl_inner .= '<li>';
  17. $tpl_inner .= '<img src='.$infoicon['field_icons__img'].'>';
  18. $tpl_inner .= $infoicon['field_icons__text'];
  19. $tpl_inner .= '</li>';
  20. }
  21.  
  22. }
  23.  
  24. };
  25.  
  26. $tpl .= '<h2 class="infoicons_heading">Коротко о главном:</h2>';
  27. $tpl .= '<ul class="infoicons_wrapper clearfix">';
  28. $tpl .= $tpl_inner;
  29. $tpl .= '</ul>';
  30.  
  31. echo $tpl;
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement