Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $id = get_the_ID();
- $posts = get_posts( array('post_type'=>'postTypeName','numberposts' => 500,) );
- $i=0;
- foreach( $posts as $post ){
- $fields = get_field('fieldName',$post->ID);
- if($fields){
- foreach ($fields as $field) {
- if($id == $field->ID){?>
- <?php $img_team = get_field('image'); ?>
- <div class="team">
- <div class="specialists-wrapper-services">
- <a href="<?php the_permalink() ?>">
- <div class="specialist">
- <div class="img">
- <img src="<?=$img_team['url']; ?>" alt="<?=$img_team['alt']; ?>" />
- </div>
- <div class="text">
- <span class="fio"><?php the_title(); ?></span>
- <span class="dolzhnost"><?php the_field('post'); ?></span>
- </div>
- </div>
- </a>
- </div>
- </div>
- <?$i++;}
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement