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

View File

@@ -23,11 +23,13 @@ $current_cat_id = $category->term_id;
$part_args = [
'category__in' => $current_cat_id,
'posts_per_page' => 15,
'posts_per_page' => 22
];
$part_query = new WP_Query( $part_args );
?>
<div id="content">
@@ -40,27 +42,21 @@ $part_query = new WP_Query( $part_args );
<h1 class="my-4"><?=single_cat_title()?></h1>
<?php if($part_query->have_posts()) :?>
<div class="search-card-box">
<? if($part_query->have_posts()) :?>
<?php while($part_query->have_posts()) : the_post();?>
<?$curr_id = get_the_id();?>
<?while( $part_query->have_posts() ) :
<?if ($curr_id > 0):?>
$part_query->the_post();?>
<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();?>"><strong><?the_title();?></strong></a></div>
<div class="search-card-title"><a href="<?the_permalink();?>"><?the_title();?></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 (isset($_COOKIE["vec_$curr_id"])):?>
<p>Спасибо за Ваш голос</p>
<?endif?>
@@ -77,25 +73,17 @@ $part_query = new WP_Query( $part_args );
</div>
<?endwhile;?>
<?endif?>
<?php endwhile;?>
</div>
<?$GLOBALS['wp_query']->max_num_pages = $part_query->max_num_pages?>
<?get_template_part( '/blocks/paginator');?>
<?wp_reset_postdata();?>
<?else:?>
Здесь пока нет публикаций
<?php endif;?>
</div>

View File

@@ -41,7 +41,7 @@
<?if ( has_post_thumbnail() ) :?>
<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>
<?endif?>
<div class="fulltext"><?the_content();?></div>

View File

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