<?php
/*
Template Name: Блог
*/
?>
<?php get_header(); ?>
<div class="content-main">
<?php get_sidebar(); ?>
<div class="content-left">
<?php add_filter('excerpt_length', 'blog_excerpt_length'); ?>
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
'cat' => -2, 7,
'paged' => get_query_var('paged'),
'posts_per_page' => 3,
);
$query = new WP_Query( $args );
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post(); ?>
<div class="content-left">
<div class="blog-post-main">
<div class="blog-post-content">
<h2 class="blog-post-title"><a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a><span class="blog-post-date"><?php the_time('d.m.Y'); ?></span></h2>
<?php echo get_the_post_thumbnail(); ?>
<p class="blog-post-text"> <?php echo get_the_excerpt(); ?> </p>
</div>
<div class="blog-post-info">
<span class="blog-post-line"></span>
<div class="blog-post-info-left">
<span><?php the_tags(); ?></span>
</div>
<div class="blog-post-info-button-main">
<span class="blog-post-info-button"><a href="<?php the_permalink(); ?>">ЧИТАТЬ ДАЛЕЕ</a></span>
</div>
</div>
</div>
</div>
<?php }
} else {
}
wp_reset_postdata();
?>
</div>
<div class="pagination">
<?php wp_pagenavi(); ?>
</div>
</div>
<?php get_footer(); ?>
PD9waHAKLyoKVGVtcGxhdGUgTmFtZTog0JHQu9C+0LMKKi8KPz4KPD9waHAgZ2V0X2hlYWRlcigpOyA/PgoKPGRpdiBjbGFzcz0iY29udGVudC1tYWluIj4KICAgIDw/cGhwIGdldF9zaWRlYmFyKCk7ID8+CiAgICA8ZGl2IGNsYXNzPSJjb250ZW50LWxlZnQiPgogICAgPD9waHAgYWRkX2ZpbHRlcignZXhjZXJwdF9sZW5ndGgnLCAnYmxvZ19leGNlcnB0X2xlbmd0aCcpOyA/PgogICAgPD9waHAKICAgICAgICAKICAgICAgICAkcGFnZWQgPSAoZ2V0X3F1ZXJ5X3ZhcigncGFnZWQnKSkgPyBnZXRfcXVlcnlfdmFyKCdwYWdlZCcpIDogMTsKICAgICAgICAKICAgICAgICAkYXJncyA9IGFycmF5KAogICAgICAgICAgICAnY2F0JyA9PiAtMiwgNywKICAgICAgICAgICAgJ3BhZ2VkJyA9PiBnZXRfcXVlcnlfdmFyKCdwYWdlZCcpLAogICAgICAgICAgICAncG9zdHNfcGVyX3BhZ2UnID0+IDMsCiAgICAgICAgKTsKICAgICAgICAKICAgICAgICAkcXVlcnkgPSBuZXcgV1BfUXVlcnkoICRhcmdzICk7CiAgICAgICAgCiAgICAgICAgaWYgKCAkcXVlcnktPmhhdmVfcG9zdHMoKSApIHsKICAgICAgICAgICAgd2hpbGUgKCAkcXVlcnktPmhhdmVfcG9zdHMoKSApIHsKICAgICAgICAgICAgICAgICRxdWVyeS0+dGhlX3Bvc3QoKTsgPz4KICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iY29udGVudC1sZWZ0Ij4KICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImJsb2ctcG9zdC1tYWluIj4KICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJibG9nLXBvc3QtY29udGVudCI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgIDxoMiBjbGFzcz0iYmxvZy1wb3N0LXRpdGxlIj48YSBocmVmPSI8P3BocCB0aGVfcGVybWFsaW5rKCk7ID8+Ij4gPD9waHAgdGhlX3RpdGxlKCk7ID8+IDwvYT48c3BhbiBjbGFzcz0iYmxvZy1wb3N0LWRhdGUiPjw/cGhwIHRoZV90aW1lKCdkLm0uWScpOyA/Pjwvc3Bhbj48L2gyPgogICAgICAgICAgICAgICAgICAgICAgICAgICA8P3BocCBlY2hvIGdldF90aGVfcG9zdF90aHVtYm5haWwoKTsgPz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgPHAgY2xhc3M9ImJsb2ctcG9zdC10ZXh0Ij4gPD9waHAgZWNobyBnZXRfdGhlX2V4Y2VycHQoKTsgPz4gPC9wPgogICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImJsb2ctcG9zdC1pbmZvIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9ImJsb2ctcG9zdC1saW5lIj48L3NwYW4+CiAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImJsb2ctcG9zdC1pbmZvLWxlZnQiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4+PD9waHAgdGhlX3RhZ3MoKTsgPz48L3NwYW4+CiAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJibG9nLXBvc3QtaW5mby1idXR0b24tbWFpbiI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0iYmxvZy1wb3N0LWluZm8tYnV0dG9uIj48YSBocmVmPSI8P3BocCB0aGVfcGVybWFsaW5rKCk7ID8+Ij7Qp9CY0KLQkNCi0Kwg0JTQkNCb0JXQlTwvYT48L3NwYW4+CiAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgCiAgICAgICAgICAgIDw/cGhwIH0KICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAKICAgICAgICB9CiAgICAgICAgCiAgICAgICAgd3BfcmVzZXRfcG9zdGRhdGEoKTsKICAgICAgICAKICAgID8+CiAgICAgICAgPC9kaXY+CiAgICAgICAgCgogICAgICAgIDxkaXYgY2xhc3M9InBhZ2luYXRpb24iPgogICAgICAgICAgICA8P3BocCB3cF9wYWdlbmF2aSgpOyA/PgogICAgICAgIDwvZGl2PgogICAgICAgIAo8L2Rpdj4KCjw/cGhwIGdldF9mb290ZXIoKTsgPz4=