moread and yest

This commit is contained in:
arlemp@selectel.ru
2021-11-11 23:15:08 +03:00
parent 6ecfa0549a
commit 00e5dd181a
6 changed files with 9 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ $posts = get_posts( array(
'meta_key' => '', 'meta_key' => '',
'meta_value' =>'', 'meta_value' =>'',
'post_type' => 'post', 'post_type' => 'post',
'post__not_in' => array($post_id),
'meta_query' => array( 'meta_query' => array(
array( array(
'key' => '_thumbnail_id', 'key' => '_thumbnail_id',
@@ -30,7 +31,7 @@ if( $posts ):?>
setup_postdata( $post );?> setup_postdata( $post );?>
<div class="moread_card"> <div class="moread_card">
<img src="<?php echo get_the_post_thumbnail_url($post, 'moread');?>" alt="<?the_title();?>"> <img src="<?php echo get_the_post_thumbnail_url($post);?>" alt="<?the_title();?>">
<div class="moread_title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></div> <div class="moread_title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></div>
<div class="moread_date"><?the_time('j F Y, G:i');?></div> <div class="moread_date"><?the_time('j F Y, G:i');?></div>
</div> </div>

View File

@@ -8,6 +8,7 @@
'meta_key' => '', 'meta_key' => '',
'meta_value' =>'', 'meta_value' =>'',
'post_type' => 'post', 'post_type' => 'post',
'post__not_in' => array($post_id),
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса 'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
) ); ) );

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=54"> <link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=57">
<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

@@ -48,7 +48,7 @@ $nn = 0;?>
<div class="mini-card"> <div class="mini-card">
<?if ( has_post_thumbnail() ) :?> <?if ( has_post_thumbnail() ) :?>
<div class="mini-card-img"> <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> <a href="<?the_permalink();?>"><img class="mini-card-img" src="<?php echo get_the_post_thumbnail_url(); ?>" alt="<?the_title();?>"></a>
<?if( has_tag( 'видео' ) ):?> <?if( has_tag( 'видео' ) ):?>
<span class="play-card"></span> <span class="play-card"></span>
<?endif?> <?endif?>

View File

@@ -12,6 +12,7 @@
<?php $category = get_the_category(); <?php $category = get_the_category();
$category_id = $category[0]->term_id; $category_id = $category[0]->term_id;
$category_link = get_category_link($category_id); $category_link = get_category_link($category_id);
$post_id = get_the_ID();
?> ?>
<ul id="nav_content"> <ul id="nav_content">

View File

@@ -1072,7 +1072,7 @@ a{
.moread{ .moread{
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
grid-gap: 2rem; grid-gap: 2rem;
margin-top: 8px; margin-top: 8px;
margin-bottom: 28px; margin-bottom: 28px;
@@ -1162,7 +1162,7 @@ a{
margin-top: 8px; margin-top: 8px;
margin-bottom: 28px; margin-bottom: 28px;
padding: 8px; padding: 8px;
width: 100%;
} }
.yet_card{ .yet_card{