add category rosselkhoznadzor

This commit is contained in:
2021-10-09 13:05:18 +03:00
parent c2819573de
commit e9bc2dbd8b
9 changed files with 99 additions and 14 deletions

View File

@@ -2,7 +2,7 @@
$posts = get_posts( array( $posts = get_posts( array(
'numberposts' => 1, 'numberposts' => 1,
'category' => 19, // 19 - архив газеты 'category' => 3, // 19 - архив газеты
'orderby' => 'date', 'orderby' => 'date',
'order' => 'DESC', 'order' => 'DESC',
'include' => array(), 'include' => array(),

View File

@@ -6,7 +6,7 @@ if (!$posts = kuri_set($key)) {
$posts = get_posts( array( $posts = get_posts( array(
'numberposts' => 1, 'numberposts' => 1,
'category' => 7, // 7 - мнения 'category' => 30, // 7 - мнения
'orderby' => 'date', 'orderby' => 'date',
'order' => 'DESC', 'order' => 'DESC',
'include' => array(), 'include' => array(),

View File

@@ -4,7 +4,7 @@
$posts = get_posts( array( $posts = get_posts( array(
'numberposts' => 3, 'numberposts' => 3,
'category' => 44, // 44 - мероприятия 'category' => 61, // 61 - мероприятия
'orderby' => 'date', 'orderby' => 'date',
'order' => 'DESC', 'order' => 'DESC',
'include' => array(), 'include' => array(),

View File

@@ -5,7 +5,7 @@ $key = 'vij_opinions';
if (!$opinions = kuri_set($key)) { if (!$opinions = kuri_set($key)) {
$opinions = get_posts( array( $opinions = get_posts( array(
'numberposts' => 1, 'numberposts' => 1,
'category' => 7, // 7 - мнения 'category' => 30, // 7 - мнения
'orderby' => 'date', 'orderby' => 'date',
'order' => 'DESC', 'order' => 'DESC',
'include' => array(), 'include' => array(),

View File

@@ -0,0 +1,70 @@
<?php
/**
* The main template file.
*
*/
get_header();
$nn = 0;?>
<div id="content">
<ul id="nav_content">
<li><a href="http://beta.vetandlife.ru">Главная</li>
<li> - <?single_cat_title()?></li>
</ul>
<h1 class="my-4"><?=single_cat_title()?></h1>
<?php if(have_posts()) : while(have_posts()) : the_post();?>
<?$nn++;?>
<?if ($nn == 1):?>
<div class="main-card">
<?if ( has_post_thumbnail() ) :?>
<a href="<?the_permalink();?>"><img class="card-img-top" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>"></a>
<?endif?>
<h2 class="main-card-title-left"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
<div class="main-card-body">
<div class="main-card-text"><a href="<?the_permalink();?>"><?the_excerpt();?></a></div>
<div class="news_date"><?the_time('j F Y, G:i');?></div>
</div>
</div>
<?elseif ($nn == 2):?>
<div class="mini-card-block">
<?endif?>
<?if ($nn > 1):?>
<div class="mini-card">
<?if ( has_post_thumbnail() ) :?>
<a href="<?the_permalink();?>"><img class="mini-card-img" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>"></a>
<?endif?>
<h2 class="mini-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
<div class="mini-card-body">
<div class="news_date"><?the_time('j F Y, G:i');?></div>
</div>
</div>
<?endif?>
<?php endwhile;?>
</div> <!--//end minicard block -->
<?else:?>
Здесь пока нет публикаций
<?php endif;?>
<?get_template_part( '/blocks/paginator');?>
</div>
<?php get_footer(); ?>

View File

@@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><?php wp_title('|', true, 'right');?></title> <title><?php wp_title('|', true, 'right');?></title>
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=11"> <link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=12">
<link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet"> <link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/jquery-3.6.0.min.js"></script> <script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/jquery-3.6.0.min.js"></script>
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/burger-menu.js?ver=9"></script> <script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/burger-menu.js?ver=9"></script>

View File

@@ -11,7 +11,7 @@ $nn = 0;?>
<?php $query = new WP_Query( <?php $query = new WP_Query(
array( array(
'category__not_in' => array(2, 15, 18 ,44, 1028), 'category_in' => array(2),
'meta_query' => array( 'meta_query' => array(
array( array(
'key' => '_thumbnail_id', 'key' => '_thumbnail_id',
@@ -55,7 +55,9 @@ $nn = 0;?>
<div class="mini-card"> <div class="mini-card">
<?if ( has_post_thumbnail() ) :?> <?if ( has_post_thumbnail() ) :?>
<a href="<?the_permalink();?>"><img class="mini-card-img" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>"></a> <div class="mini-card-img">
<a href="<?the_permalink();?>"><img class="mini-card-img" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" alt="<?the_title();?>"></a>
</div>
<?endif?> <?endif?>
<h2 class="mini-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2> <h2 class="mini-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
<div class="mini-card-body"> <div class="mini-card-body">

View File

@@ -45,7 +45,7 @@
</div> </div>
<div class="post_img_title"><?the_post_thumbnail_caption()?></div> <div class="post_img_title"><?the_post_thumbnail_caption()?></div>
<?endif?> <?endif?>
<div><?the_content();?></div> <div class="fulltext"><?the_content();?></div>
<!--<p><small class="text-muted"><?php the_tags('');?></small></p> --> <!--<p><small class="text-muted"><?php the_tags('');?></small></p> -->
<?//endwhile;?> <?//endwhile;?>

View File

@@ -426,7 +426,9 @@ a{
margin-right: 18px; margin-right: 18px;
} }
.fulltext a{
color: #2D9CDB;
}
.sp-button{ .sp-button{
color: orange; color: orange;
@@ -561,8 +563,8 @@ a{
} }
#post-img{ #post-img{
/**text-align: center;*/ text-align: center;
background: #F5F5F5; /**background: #F5F5F5;*/
} }
#event-img{ #event-img{
@@ -680,6 +682,11 @@ a{
.card-img-top{ .card-img-top{
text-align: center; text-align: center;
width: 100%; width: 100%;
margin-bottom: 12px;
}
.mini-card-img{
margin-bottom: 4px;
} }
@@ -715,6 +722,14 @@ a{
text-align: center; text-align: center;
} }
.main-card-title-left{
font-family: 'GrtskPeta';
font-size: 36px;
text-align: right;
}
.main-card-text{ .main-card-text{
font-family: 'GrtskPeta'; font-family: 'GrtskPeta';
font-size: 18px; font-size: 18px;
@@ -1199,7 +1214,6 @@ img-fluid{
display: none; display: none;
} }
.main-card-title{ .main-card-title{
font-size: 24px; font-size: 24px;
} }
@@ -1207,7 +1221,7 @@ img-fluid{
#content{ #content{
/*width: 100%;*/ /*width: 100%;*/
min-width: 780px; max-width: 780px;
} }
@@ -1256,7 +1270,6 @@ img-fluid{
} }
.mob-lite{ .mob-lite{
display: inline-block !important; display: inline-block !important;
margin-top: 12px; margin-top: 12px;