add calendar events
This commit is contained in:
89
category-votes.php
Normal file
89
category-votes.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/**
|
||||
* The main template file.
|
||||
*
|
||||
*/
|
||||
|
||||
get_header();
|
||||
$nn = 0;
|
||||
$ids = [];
|
||||
|
||||
$votes_file = '/vhosts/beta/wp-content/themes/vij/golos.json';
|
||||
|
||||
if (file_exists($votes_file)){
|
||||
$votes = json_decode(file_get_contents($votes_file, true));
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<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()) :?>
|
||||
<div class="search-card-box">
|
||||
|
||||
<?php while(have_posts()) : the_post();?>
|
||||
<?$curr_id = get_the_id()?>
|
||||
|
||||
<div class="search-card">
|
||||
|
||||
<!--<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?>
|
||||
<div><a href="<?the_permalink();?>"><strong><?the_title();?></strong></a></div>
|
||||
|
||||
<?if (!isset($_COOKIE[COOK_GOLOS])):?>
|
||||
|
||||
<div id="golos-<?=get_the_id()?>">
|
||||
<br><button style="padding: 8px; cursor: pointer;" id="golos" onclick="javascript:add_golos(<?=get_the_id();?>, 'golos-<?=get_the_id()?>');">Проголосовать</button>
|
||||
</div>
|
||||
|
||||
<?endif?>
|
||||
|
||||
<?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>
|
||||
|
||||
|
||||
|
||||
<?php endwhile;?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?get_template_part( '/blocks/paginator');?>
|
||||
|
||||
|
||||
<?else:?>
|
||||
|
||||
Здесь пока нет публикаций
|
||||
|
||||
<?php endif;?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
Reference in New Issue
Block a user