Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <?php if( $fa = herald_get_featured_area() ) : ?>
- <?php if(!empty($fa['query']) && !empty( $fa['query']->posts ) ): ?>
- <?php $fa_query = $fa['query']; ?>
- <div class="herald-section container herald-no-sid">
- <div class="row">
- <div class="herald-module col-lg-12 col-md-12">
- <?php herald_set_img_flag('full'); ?>
- <?php include( locate_template('template-parts/featured/area-'. $fa['layout'].'.php' ) ); ?>
- <?php herald_set_img_flag(''); ?>
- </div>
- </div>
- </div>
- <?php endif; ?>
- <?php endif; ?>
- <?php global $herald_sidebar_opts; ?>
- <?php $section_class = $herald_sidebar_opts['use_sidebar'] == 'none' ? 'herald-no-sid' : '' ?>
- <div class="herald-section container <?php echo esc_attr($section_class); ?>">
- <div class="row">
- <?php if($herald_sidebar_opts['use_sidebar'] == 'left'): ?>
- <?php get_sidebar(); ?>
- <?php endif; ?>
- <?php $wrap_class = $herald_sidebar_opts['use_sidebar'] != 'none' ? 'herald-main-content col-lg-9 col-md-9' : 'col-lg-12 col-md-12' ?>
- <div class="herald-module col-mod-main <?php echo esc_attr($wrap_class); ?>">
- <br>
- <!-- Yandex.RTB R-A-238189-17 -->
- <div id="yandex_rtb_R-A-238189-17"></div>
- <script type="text/javascript">
- (function(w, d, n, s, t) {
- w[n] = w[n] || [];
- w[n].push(function() {
- Ya.Context.AdvManager.render({
- blockId: "R-A-238189-17",
- renderTo: "yandex_rtb_R-A-238189-17",
- async: true
- });
- });
- t = d.getElementsByTagName("script")[0];
- s = d.createElement("script");
- s.type = "text/javascript";
- s.src = "//an.yandex.ru/system/context.js";
- s.async = true;
- t.parentNode.insertBefore(s, t);
- })(this, this.document, "yandexContextAsyncCallbacks");
- </script>
- <div class="nav-single">
- <?php
- if ( function_exists('yoast_breadcrumb') ) {
- yoast_breadcrumb('
- <p id="breadcrumbs">','</p>
- ');
- }
- ?>
- </div>
- <?php if ( $archive_heading = herald_get_archive_heading() ): ?>
- <?php echo $archive_heading; ?>
- <?php endif; ?>
- <?php $ad_position = herald_get_option('ad_between_posts') ? absint( herald_get_option('ad_between_posts_position') - 1 ) : false ; ?>
- <div class="row row-eq-height herald-posts">
- <?php
- $category = get_queried_object();
- $cat_id = $category->term_id;
- echo "<!-- $cat_id -->";
- $cat_level = count(get_ancestors($cat_id,'category')); // уровень категории от 0 до n
- $exclude_cats = array('2716','2631'); // Категории-исключения, где нужно видеть посты.
- // Если категория второго уровня (0,1,2..) и её номер не в исключениях, убрать посты. Костыль
- // if($cat_level==1 && !in_array($cat_id,$exclude_cats)){
- // query_posts('category_name=random63463646346363');
- // }
- // else{
- // Своя сортировка для некоторых категорий
- if($cat_id != 622 && $cat_id != 1229 && $cat_id != 620 && $cat_id != 1464 && $cat_id != 1230 ){
- query_posts($query_string.'&orderby=title&order=asc');
- }
- else{
- query_posts($query_string.'&orderby=date&order=desc');
- }
- // }
- ?>
- <?php if(have_posts()): ?>
- <?php $i = 0; while ( have_posts() ) : the_post(); ?>
- <?php ?>
- <?php get_template_part('template-parts/layouts/content', herald_get_current_post_layout( $i ) ); ?>
- <?php if( $i === $ad_position ) { get_template_part('template-parts/ads/between-posts'); } ?>
- <?php $i++; endwhile; ?>
- <?php else : ?>
- <?php get_template_part('template-parts/layouts/content-none' ); ?>
- <?php endif;?>
- </div>
- <?php if( $pagination = herald_get_current_pagination() ) : ?>
- <?php get_template_part( 'template-parts/pagination/' . $pagination ); ?>
- <?php endif; ?>
- </div>
- <?php if( $herald_sidebar_opts['use_sidebar'] == 'right' ): ?>
- <?php get_sidebar(); ?>
- <?php endif; ?>
- </div>
- <style>
- .txt-more { height:300px; margin:20px 0;}
- @media(min-width: 800px) { .txt-more { height:180px; margin: 0 0 40px 0;} }
- </style>
- <center>
- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
- <ins class="adsbygoogle txt-more"
- style="display:block"
- data-ad-client="ca-pub-3758637505510927"
- data-ad-slot="4929820333"
- data-ad-format="link"></ins>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script>
- </center>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement