Files
profile/archive-category-mamleev.php

89 lines
4.3 KiB
PHP
Raw Normal View History

2025-07-09 21:21:17 +03:00
<?php if(wp_is_mobile()): ?>
<style>
@media (min-width: 768px) {
.article__body {
min-height:100px;
}
}
</style>
<div class="row clearfix pb-5">
<div class="col-12">
<?php if((is_branding() || is_branding_page()) && get_term_meta(get_queried_object()->term_id,'suptitle',1) != ''): ?>
<h6>
<a href="<?php echo get_term_meta(get_queried_object()->term_id,'link',1) ?>" target="_blank">
<?php echo get_term_meta(get_queried_object()->term_id,'suptitle',1) ?>
</a>
</h6>
<?php endif; ?>
<div class="story__title">
<?php echo get_term_meta(get_queried_object()->term_id,'subtitle',1); ?>
</div>
<?php echo term_description( get_queried_object()->term_id ); ?>
<div class="row clearfix d-block pt-0 pt-md-3">
<?php get_template_part( 'content-menu-item-header' ); ?>
<?php if ( have_posts() ) : ?>
<?php
while ( have_posts() ) :;
the_post();
get_template_part( 'content', 'preview-short-rubrick-mamleev' );
endwhile;
if(is_category()):
$cat = get_query_var('cat');
$category = get_category ($cat);
//echo do_shortcode('[ajax_load_more cache="true" cache_id="'.wp_is_mobile().crc32('archive-branding-author').get_queried_object_id().get_last_id().'" id="category_request" scroll_distance="50" button_label="Загрузить еще" container_type="div" post_type="profile_article, anew" offset="'.(get_option('posts_per_page')).'" posts_per_page="10" post_format="standard" category="'.$category->slug.'"]');
endif;
?>
<?php
else :
get_template_part( 'content', 'none' );
endif;
?>
</div>
</div>
</div>
<?php else: ?>
<div class="row clearfix pb-5">
<div class="col-12 col-md-8 col-xl-9">
<?php if((is_branding() || is_branding_page()) && get_term_meta(get_queried_object()->term_id,'suptitle',1) != ''): ?>
<h6>
<a href="<?php echo get_term_meta(get_queried_object()->term_id,'link',1) ?>" target="_blank">
<?php echo get_term_meta(get_queried_object()->term_id,'suptitle',1) ?>
</a>
</h6>
<?php endif; ?>
<div class="story__title">
<?php echo get_term_meta(get_queried_object()->term_id,'subtitle',1); ?>
</div>
<?php echo term_description( get_queried_object()->term_id ); ?>
<div class="row clearfix d-block">
<?php get_template_part( 'content-menu-item-header' ); ?>
<?php if ( have_posts() ) : ?>
<?php
while ( have_posts() ) :;
the_post();
get_template_part( 'content', 'preview-short-rubrick-mamleev' );
endwhile;
if(is_category()):
$cat = get_query_var('cat');
$category = get_category ($cat);
//echo do_shortcode('[ajax_load_more cache="true" cache_id="'.wp_is_mobile().crc32('archive-branding-author').get_queried_object_id().get_last_id().'" id="category_request" scroll_distance="50" button_label="Загрузить еще" container_type="div" post_type="profile_article, anew" offset="'.(get_option('posts_per_page')).'" posts_per_page="10" post_format="standard" category="'.$category->slug.'"]');
endif;
?>
<?php
else :
get_template_part( 'content', 'none' );
endif;
?>
</div>
</div>
<div class="col-12 col-md-4 col-xl-3">
<div class="right-side">
<?php dynamic_sidebar('right_sidebar'); ?></div>
<div class="js-stickybit">
<?php get_template_part( 'content', 'ad' ); ?>
</div>
</div>
</div>
</div>
<?php endif; ?>