Title: kiselev's Replies | WordPress.org

---

# kiselev

  [  ](https://wordpress.org/support/users/kiselev/)

 *   [Profile](https://wordpress.org/support/users/kiselev/)
 *   [Topics Started](https://wordpress.org/support/users/kiselev/topics/)
 *   [Replies Created](https://wordpress.org/support/users/kiselev/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/kiselev/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/kiselev/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/kiselev/engagements/)
 *   [Favorites](https://wordpress.org/support/users/kiselev/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Yandex Map for ACF] Как при клике на метку вывести информацию о посте(изображение, заголовок и т.д)](https://wordpress.org/support/topic/%d0%ba%d0%b0%d0%ba-%d0%bf%d1%80%d0%b8-%d0%ba%d0%bb%d0%b8%d0%ba%d0%b5-%d0%bd%d0%b0-%d0%bc%d0%b5%d1%82%d0%ba%d1%83-%d0%b2%d1%8b%d0%b2%d0%b5%d1%81%d1%82%d0%b8-%d0%b8%d0%bd%d1%84%d0%be%d1%80%d0%bc%d0%b0/)
 *  Thread Starter [kiselev](https://wordpress.org/support/users/kiselev/)
 * (@kiselev)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/%d0%ba%d0%b0%d0%ba-%d0%bf%d1%80%d0%b8-%d0%ba%d0%bb%d0%b8%d0%ba%d0%b5-%d0%bd%d0%b0-%d0%bc%d0%b5%d1%82%d0%ba%d1%83-%d0%b2%d1%8b%d0%b2%d0%b5%d1%81%d1%82%d0%b8-%d0%b8%d0%bd%d1%84%d0%be%d1%80%d0%bc%d0%b0/#post-9761391)
 * Может кому пригодится.
 *     ```
       function the_multiple_yandex_map($posts = array()){
           global $post;
           $marks = array(); // Все метки
           $marks_counter = 1;
   
           foreach ($posts as $post) {
               $data = (array)json_decode(get_field('местоположение', get_the_ID(), false), true); // загрузка меток из записи
               if (!isset($data['marks']) || !is_array($data['marks'])) {
                   continue;
               }
               $images = get_field('фото'); 
               $image = array_shift($images);
               $top_term = get_top_term( 'district' );
               foreach ((array)$data['marks'] as $mark) {
                   $mark['id'] = $marks_counter;
                   $mark['content'] = "<div class='mark_building'>";
                   //$mark['content'] .= "<img src='".$image['url']."' alt='".$image['alt']."' />";
                   $mark['content'] .= "<div class='mark_info'>";
                   $mark['content'] .= "<div class='info_title'><a href='".get_the_permalink()."'>".get_the_title()."</a></div>";
                   $mark['content'] .= "<ul>";
                   $mark['content'] .= "<li><span>Адрес</span><span>".get_field('адрес')."</span></li>";
                   $mark['content'] .= "<li><span>Район</span><span>".$top_term->name."</span></li>";
                   $mark['content'] .= "<li><span>Цена за м2</span><span>".get_field('цена_от')."</span></li>";
                   $mark['content'] .= "</ul>";
                   $mark['content'] .= "</div>";
                   $mark['content'] .= "</div>";
   
                   $marks[] = $mark;
   
                   $marks_counter++;
               }
           }
   
           $map_data = array(
               "center_lat" => 45.035566,
               "center_lng" => 38.974711,
               "zoom" => 12,
               "type" => "map"
           ); // загрузка параметров карты для вывода всех меток
   
   
   
           $map_data['marks'] = $marks;
   
           echo '<div>'.the_yandex_map('', false, json_encode($map_data), 450).'</div>';
           //echo '<pre>'.var_dump(json_encode($map_data)).'</pre>';
       }
       ```
   

Viewing 1 replies (of 1 total)