<div class="onegallery js-popup-gallery micromarking">
        <div class="onegallery__slider">
                <div class="flex-container">
                        <div class="flex-child">
                                <div class="slider js-gallery js-gallery-open">
                                    <div class="gallery">
                                        <?php echo get_post_gallery(); ?>
                                    </div>
                                </div>
                        </div>
                </div>
                <a class="icon icon--gray js-popup-gallery-open" href="#">
                        <svg class="svg-icon">
                                <use xlink:href="/wp-content/themes/profile/assets/img/sprites-svg/dist/sprite.svg#fullscreen"></use>
                        </svg>
                </a>
        </div>
        <div class="onegallery__side js-popup-info">
                <div class="onegallery__top js-popup-top">
                        <a class="onegallery__toggle js-popup-toggle" href="#"></a>
                        <a class="onegallery__back js-popup-gallery-close" href="">Вернуться в раздел фото</a>
                </div>
                <div class="onegallery__side__inner">
                        <h1 class="onegallery__title">
                                <?php echo the_title(); ?>
                        </h1>
                        <h4 class="onegallery__subtitle">
                                <?php echo get_secondary_title(); ?>
                        </h4>
                        <div class="onegallery__social">
                            <div class="stick">
                                <!--div class="ya-share2" data-services="facebook,vkontakte,twitter,telegram,odnoklassniki"></div-->
                                <?php //echo share_block(get_the_ID()); ?>
                            </div>
                        </div>
                        <div class="onegallery__body js-gallery-content">
                            <?php echo get_post_gallery_description(get_the_ID()); ?>
                        </div>
                        <span class="onegallery__caption js-gallery-photo">
                                ©<?php echo str_replace(array("Фото: ","Фото:"),"",get_post_gallery_copyright(get_the_ID())); ?>
                        </span>
                </div>
        </div>
</div>
<?php
    $postcat = get_post_primary_category(get_the_ID());
    $postcat = $postcat['primary_category'];
?>
<div class="gallery">
    <div class="row clearfix d-block">
        <?php $shortcode = '[ajax_load_more cache="true" cache_id="'.wp_is_mobile().crc32('content-gallery').get_queried_object_id().'" post_type="profile_article" custom_args="type:gallery"  category__and="'.$postcat->term_id.'" button_label="Загрузить еще" posts_per_page="12" scroll_distance="50" container_type="div" post__not_in="'. get_queried_object_id().'"]'; ?>
        <?php echo do_shortcode($shortcode); ?>
    </div>
</div>
