correct rubrics

This commit is contained in:
2021-11-15 14:22:23 +03:00
parent 274f7adbf8
commit fc91944876
6 changed files with 106 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ if( $posts ):
?> ?>
<div class="right_archive"> <div class="right_archive">
<a href="<?php the_permalink(); ?>"><img width="280" class="right_archive_img" src="<?php echo get_the_post_thumbnail_url($post, 'fil');?>" alt="<?the_title();?>"></a> <a href="<?php the_permalink(); ?>"><img width="147" class="right_archive_img" src="<?php echo get_the_post_thumbnail_url($post, 'fil');?>" alt="<?the_title();?>"></a>
<div class="right_archive_text"><a href="<?php the_permalink(); ?>">Читать газету<br>«Ветеринария и Жизнь»</a></div> <div class="right_archive_text"><a href="<?php the_permalink(); ?>">Читать газету<br>«Ветеринария и Жизнь»</a></div>
<div class="right_archive_link"><a href="<?php the_permalink(); ?>"><?=the_title();?></a></div> <div class="right_archive_link"><a href="<?php the_permalink(); ?>"><?=the_title();?></a></div>
</div> </div>

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');?><?=get_bloginfo('name')?></title> <title><?php wp_title('|', true, 'right');?><?=get_bloginfo('name')?></title>
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=57"> <link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=58">
<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>

101
single-35.php Normal file
View File

@@ -0,0 +1,101 @@
<?php get_header();?>
<div id="content">
<?//while(have_posts()):?>
<?the_post();?>
<?php $category = get_the_category();
$category_id = $category[0]->term_id;
$category_link = get_category_link($category_id);
?>
<ul id="nav_content">
<li><a href="<?=get_site_url()?>">Главная</li>
<li>-<li>
<li><a href="<?=$category_link?>"><?=$category['0']->name;?></a></li>
<li>-<li>
<li><?=mb_substr(get_the_title(), 0, 50);?>...</li>
</ul>
<div class="post_info">
<div class="post_info_sub">
<span class="post_link_category"><a href="<?=$category_link?>"><?=$category['0']->name;?></a></span>
</div>
<div class="post_info_sub post_info_social">
<?php include get_template_directory().'/blocks/social-share.php';?>
</div>
</div>
<h1 class="post-h1"><?php wp_title('');?></h1>
<?if ( has_post_thumbnail() ) :?>
<div id="post-img">
<img class="img-fluid rounded" src="<?php echo get_the_post_thumbnail_url(null, 'full');?>" alt="<?the_title();?>">
</div>
<div class="post_img_title"><?the_post_thumbnail_caption()?></div>
<?endif?>
<div class="fulltext"><?the_content();?></div>
<!--<p><small class="text-muted"><?php the_tags('');?></small></p> -->
<?//endwhile;?>
<div class="yets_rubric">Другие участники</div>
<div class="yets">
<?$prevpost = get_previous_post(True)?>
<?if ($prevpost !== ''):?>
<div class="yet_card">
<div class="yet_title"><a href="<?=get_permalink($prevpost->ID)?>"><<&nbsp;&nbsp;<?=$prevpost->post_title;?></a></div>
</div>
<?else:?>
<div class="yet_card">
<div class="yet_title"><a href="<?=get_category_link(35)?>"><<&nbsp;&nbsp;Все участники</a></div>
</div>
<?endif?>
<?$nextpost = get_next_post(True)?>
<?if ($nextpost !== ''):?>
<div class="yet_card">
<div class="yet_title"><a href="<?=get_permalink($nextpost->ID)?>"><?=$nextpost->post_title;?>&nbsp;&nbsp;>></a></div>
</div>
<?else:?>
<div class="yet_card">
<div class="yet_title"><a href="<?=get_category_link(35)?>">Все участники&nbsp;>></a></div>
</div>
<?endif?>
</div>
<div id="tags">
<?php the_tags();?>
</div>
<div class="post_panel_info">
<div class="post_panel_info_sub">
<!--Поделиться <i class="fas fa-share-square btn_soc_post"></i>--> <?php include get_template_directory().'/blocks/social-share.php';?>
</div>
</div>
<?php include get_template_directory().'/blocks/moread.php';?>
<div class="publ-to-main"><a href="<?=get_site_url()?>"> <span class="arrow-go-main"><</span>&nbsp;&nbsp;&nbsp;<span class="go-to-main">На главную</span></a></div>
</div>
<?php get_footer();?>

View File

@@ -1,7 +1,7 @@
<?php <?php
setlocale(LC_ALL, 'ru_RU'); //setlocale(LC_ALL, 'ru_RU');
date_default_timezone_set('Europe/Moscow'); //date_default_timezone_set('Europe/Moscow');
function calend_block($month, $year, $script=false){ function calend_block($month, $year, $script=false){

View File

@@ -1117,7 +1117,7 @@ a{
.right_archive_img{ .right_archive_img{
margin-bottom: 12px; margin-bottom: 12px;
width: 202px; width: 147px;
} }
.right_archive_text{ .right_archive_text{