echo wp_get_attachment_url(get_post_thumbnail_id(get_the_ID())); ?> " alt=""> </div> <?php } ?> </div> </section> </div> <section class="product__info-tabs"> <?php $connected_accessories_raw = get_posts(array('connected_type' => 'posts_to_pages', 'connected_items' => get_queried_object(), 'nopaging' => true, 'suppress_filters' => false)); $accessories = get_accessories_connections($connected_accessories_raw); $materials_raws = get_post_meta(get_the_ID(), '_style_demo_materials'); $materials_raws = get_materials_connections($materials_raws[0]); $info_tabs = array(); if ($post->post_content != "") { $info_tabs[] = array('product__description', 'Описание'); } if (count($accessories) > 0) { $info_tabs[] = array('product__accessories', 'Комплектующие'); } if (count($materials_raws) > 0) { $info_tabs[] = array('product__materials', 'Отделочные материалы'); } ?> <ul role="tablist" class="row"> <?php $i = 0; foreach ($info_tabs as $info_tab) {
<?php the_content(); ?> </div> </div> </div> </section> <?php $connected_materials_raw = get_categories(array('taxonomy' => 'materials')); $materials_ids = array(); foreach ($connected_materials_raw as $material) { if ($material->parent != 0) { $materials_ids[] = $material->cat_ID; } } $materials_raws = get_materials_connections($materials_ids); ?> <div class="container"> <section id="materials" class="hardware"> <div class="row"> <?php $j = 0; foreach ($materials_raws as $material_top_cat) { ?> <div class="hardware__top-cat"> <h3 class="hardware__top-cat__name"> <a href="cat-<?php echo $material_top_cat[id]; ?> " data-parent="#product__materials">