correct banners evets

This commit is contained in:
arlemp@selectel.ru
2022-02-17 18:31:07 +03:00
parent 3a750baf72
commit 108223c5df
4 changed files with 36 additions and 46 deletions

View File

@@ -2,6 +2,7 @@
'prev_text' => __( '<&nbsp;&nbsp;'.vij_lang('prev', LANG_VERSION), 'quidus' ), 'prev_text' => __( '<&nbsp;&nbsp;'.vij_lang('prev', LANG_VERSION), 'quidus' ),
'next_text' => __( vij_lang('next', LANG_VERSION).'&nbsp;&nbsp;>', 'quidus' ), 'next_text' => __( vij_lang('next', LANG_VERSION).'&nbsp;&nbsp;>', 'quidus' ),
'end_size' => 2, 'end_size' => 2,
'mid_size' => 3,
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'quidus' ) . ' </span>', 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'quidus' ) . ' </span>',
) ); ) );
?></div><?php endif;?> ?></div><?php endif;?>

View File

@@ -18,16 +18,18 @@ if (file_exists($votes_file)){
<? <?
$category = get_queried_object(); $category = get_queried_object();
$current_cat_id = $category->term_id; $current_cat_id = $category->term_id;
$part_args = [ $part_args = [
'category__in' => $current_cat_id, 'category__in' => $current_cat_id,
'posts_per_page' => 15, 'posts_per_page' => 22
]; ];
$part_query = new WP_Query( $part_args ); $part_query = new WP_Query( $part_args );
?> ?>
<div id="content"> <div id="content">
@@ -40,62 +42,48 @@ $part_query = new WP_Query( $part_args );
<h1 class="my-4"><?=single_cat_title()?></h1> <h1 class="my-4"><?=single_cat_title()?></h1>
<?php if($part_query->have_posts()) :?> <? if($part_query->have_posts()) :?>
<div class="search-card-box">
<?php while($part_query->have_posts()) : the_post();?> <?while( $part_query->have_posts() ) :
<?$curr_id = get_the_id();?>
<?if ($curr_id > 0):?> $part_query->the_post();?>
<div class="search-card"> <div class="search-card">
<!--<div class="search-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></div>--> <div class="search-card-title"><a href="<?the_permalink();?>"><?the_title();?></a></div>
<div class="search-card-title"><a href="<?the_permalink();?>"><strong><?the_title();?></strong></a></div> <?if ( has_post_thumbnail() ) :?>
<a href="<?the_permalink();?>">
<img class="search-card-img" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" width="180" alt="<?the_title();?>">
</a>
<?endif?>
<?if ( has_post_thumbnail() ) :?> <?if (isset($_COOKIE["vec_$curr_id"])):?>
<a href="<?the_permalink();?>"> <p>Спасибо за Ваш голос</p>
<img class="search-card-img" src="<?php echo get_the_post_thumbnail_url(null, 'full'); ?>" width="180" alt="<?the_title();?>"> <?endif?>
</a>
<?endif?> <!--
<div id="count-<?=$ID?>" style="margin-top: 12px;">
<i class="far fa-thumbs-up"></i> <?=$votes->$curr_id?>
</div> -->
<div class="mini-card-body">
<div class="news_date"></div>
</div>
<?if (isset($_COOKIE["vec_$curr_id"])):?>
<p>Спасибо за Ваш голос</p>
<?endif?>
<!--
<div id="count-<?=$ID?>" style="margin-top: 12px;">
<i class="far fa-thumbs-up"></i> <?=$votes->$curr_id?>
</div> -->
<div class="mini-card-body">
<div class="news_date"></div>
</div> </div>
</div> <?endwhile;?>
<?endif?>
<?php endwhile;?>
</div>
<?endif?>
<?$GLOBALS['wp_query']->max_num_pages = $part_query->max_num_pages?>
<?get_template_part( '/blocks/paginator');?> <?get_template_part( '/blocks/paginator');?>
<?wp_reset_postdata();?> <?wp_reset_postdata();?>
<?else:?>
Здесь пока нет публикаций
<?php endif;?>
</div> </div>

View File

@@ -41,7 +41,7 @@
<?if ( has_post_thumbnail() ) :?> <?if ( has_post_thumbnail() ) :?>
<div id="event-img"> <div id="event-img">
<img class="img-fluid rounded" width="180" src="<?php echo get_the_post_thumbnail_url(null, 'full');?>" alt="<?the_title();?>"> <img class="img-fluid rounded" width="198" src="<?php echo get_the_post_thumbnail_url(null, 'subscripts');?>" alt="<?the_title();?>">
</div> </div>
<?endif?> <?endif?>
<div class="fulltext"><?the_content();?></div> <div class="fulltext"><?the_content();?></div>

View File

@@ -996,6 +996,7 @@ a{
float: left; float: left;
margin-right: 12px; margin-right: 12px;
margin-bottom: 12px; margin-bottom: 12px;
width: 198px;
} }
.pagination-wrapper{ .pagination-wrapper{