add category rosselkhoznadzor
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
$posts = get_posts( array(
|
||||
'numberposts' => 1,
|
||||
'category' => 19, // 19 - архив газеты
|
||||
'category' => 3, // 19 - архив газеты
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC',
|
||||
'include' => array(),
|
||||
|
||||
@@ -6,7 +6,7 @@ if (!$posts = kuri_set($key)) {
|
||||
|
||||
$posts = get_posts( array(
|
||||
'numberposts' => 1,
|
||||
'category' => 7, // 7 - мнения
|
||||
'category' => 30, // 7 - мнения
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC',
|
||||
'include' => array(),
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
$posts = get_posts( array(
|
||||
'numberposts' => 3,
|
||||
'category' => 44, // 44 - мероприятия
|
||||
'category' => 61, // 61 - мероприятия
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC',
|
||||
'include' => array(),
|
||||
|
||||
@@ -5,7 +5,7 @@ $key = 'vij_opinions';
|
||||
if (!$opinions = kuri_set($key)) {
|
||||
$opinions = get_posts( array(
|
||||
'numberposts' => 1,
|
||||
'category' => 7, // 7 - мнения
|
||||
'category' => 30, // 7 - мнения
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC',
|
||||
'include' => array(),
|
||||
|
||||
70
category-rosselkhoznadzor.php
Normal file
70
category-rosselkhoznadzor.php
Normal 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(); ?>
|
||||
@@ -4,7 +4,7 @@
|
||||
<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">
|
||||
<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">
|
||||
<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>
|
||||
|
||||
@@ -11,7 +11,7 @@ $nn = 0;?>
|
||||
|
||||
<?php $query = new WP_Query(
|
||||
array(
|
||||
'category__not_in' => array(2, 15, 18 ,44, 1028),
|
||||
'category_in' => array(2),
|
||||
'meta_query' => array(
|
||||
array(
|
||||
'key' => '_thumbnail_id',
|
||||
@@ -55,7 +55,9 @@ $nn = 0;?>
|
||||
|
||||
<div class="mini-card">
|
||||
<?if ( has_post_thumbnail() ) :?>
|
||||
<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?>
|
||||
<h2 class="mini-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></h2>
|
||||
<div class="mini-card-body">
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
</div>
|
||||
<div class="post_img_title"><?the_post_thumbnail_caption()?></div>
|
||||
<?endif?>
|
||||
<div><?the_content();?></div>
|
||||
<div class="fulltext"><?the_content();?></div>
|
||||
<!--<p><small class="text-muted"><?php the_tags('');?></small></p> -->
|
||||
<?//endwhile;?>
|
||||
|
||||
|
||||
25
style.css
25
style.css
@@ -426,7 +426,9 @@ a{
|
||||
margin-right: 18px;
|
||||
}
|
||||
|
||||
|
||||
.fulltext a{
|
||||
color: #2D9CDB;
|
||||
}
|
||||
|
||||
.sp-button{
|
||||
color: orange;
|
||||
@@ -561,8 +563,8 @@ a{
|
||||
}
|
||||
|
||||
#post-img{
|
||||
/**text-align: center;*/
|
||||
background: #F5F5F5;
|
||||
text-align: center;
|
||||
/**background: #F5F5F5;*/
|
||||
}
|
||||
|
||||
#event-img{
|
||||
@@ -680,6 +682,11 @@ a{
|
||||
.card-img-top{
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.mini-card-img{
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
|
||||
@@ -715,6 +722,14 @@ a{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.main-card-title-left{
|
||||
|
||||
font-family: 'GrtskPeta';
|
||||
font-size: 36px;
|
||||
text-align: right;
|
||||
|
||||
}
|
||||
|
||||
.main-card-text{
|
||||
font-family: 'GrtskPeta';
|
||||
font-size: 18px;
|
||||
@@ -1199,7 +1214,6 @@ img-fluid{
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.main-card-title{
|
||||
font-size: 24px;
|
||||
}
|
||||
@@ -1207,7 +1221,7 @@ img-fluid{
|
||||
|
||||
#content{
|
||||
/*width: 100%;*/
|
||||
min-width: 780px;
|
||||
max-width: 780px;
|
||||
}
|
||||
|
||||
|
||||
@@ -1256,7 +1270,6 @@ img-fluid{
|
||||
}
|
||||
|
||||
|
||||
|
||||
.mob-lite{
|
||||
display: inline-block !important;
|
||||
margin-top: 12px;
|
||||
|
||||
Reference in New Issue
Block a user