60 lines
3.7 KiB
PHP
60 lines
3.7 KiB
PHP
<?php get_header(); ?>
|
|
<div class="row clearfix">
|
|
<div class="col-12 col-md-8 col-xl-9">
|
|
<div class="story">
|
|
<div class="story__body">
|
|
<?php if (strlen(get_term_meta(get_queried_object()->term_id,'link',1)) != 0): ?>
|
|
<a class="story__frame" href="<?php echo get_term_meta(get_queried_object()->term_id,'link',1); ?>" target="_blank">
|
|
<?php endif; ?>
|
|
<?php if (function_exists('z_taxonomy_image_url') && strlen(z_taxonomy_image_url()) != 0): ?>
|
|
<img loading="lazy" src="<?php echo z_taxonomy_image_url(); ?>" />
|
|
<?php endif; ?>
|
|
<?php if (strlen(get_term_meta(get_queried_object()->term_id,'link',1)) != 0): ?>
|
|
</a>
|
|
<?php endif; ?>
|
|
<h1 class="story__title">
|
|
<?php echo get_term_meta(get_queried_object()->term_id,'subtitle',1); ?>
|
|
</h1>
|
|
<?php echo term_description( get_queried_object()->term_id ); ?>
|
|
</div>
|
|
</div>
|
|
<div class="row clearfix d-block">
|
|
<?php if ( have_posts() ) : ?>
|
|
<?php
|
|
$rand = rand(4,5);
|
|
while ( have_posts() ) : $postNum++;
|
|
ad_inlist_mobile($postNum);
|
|
the_post();
|
|
if ($postNum == $rand && $already == false ):
|
|
$already = true;
|
|
get_template_part( 'content', 'preview-long-rubrick' );
|
|
else:
|
|
get_template_part( 'content', 'preview-short-rubrick' );
|
|
endif;
|
|
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-story-category').get_queried_object_id().get_last_id().'" id="category_request" scroll_distance="50" button_label="Загрузить еще" container_type="div" post_type="profile_article" offset="'.get_option('posts_per_page').'" posts_per_page="10" post_format="standard" category="'.$category->slug.'"]');
|
|
endif;
|
|
if(is_author()):
|
|
echo do_shortcode('[ajax_load_more cache="true" cache_id="'.wp_is_mobile().crc32('archive-story-author').get_queried_object_id().get_last_id().'" id="author_request" scroll_distance="50" button_label="Загрузить еще" container_type="div" post_type="profile_article" offset="'.get_option('posts_per_page').'" posts_per_page="12" post_format="standard" author="'.get_the_author_ID().'" ]');
|
|
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 get_footer(); ?>
|