2021-09-18 01:30:09 +03:00
|
|
|
<?php
|
|
|
|
|
|
2021-09-28 22:25:21 +03:00
|
|
|
//$key = 'vij_mosts';
|
2021-09-27 00:07:02 +03:00
|
|
|
|
2021-09-28 22:25:21 +03:00
|
|
|
//if (!$mosts = kuri_set($key)) {
|
2021-09-27 00:07:02 +03:00
|
|
|
|
|
|
|
|
$mosts = get_posts( array(
|
|
|
|
|
'numberposts' => 3,
|
2021-10-31 13:01:31 +03:00
|
|
|
'post__in' => get_option( 'sticky_posts' ),
|
2021-09-27 00:07:02 +03:00
|
|
|
'orderby' => 'date',
|
|
|
|
|
'order' => 'DESC',
|
|
|
|
|
'include' => array(),
|
|
|
|
|
'exclude' => array(),
|
|
|
|
|
'meta_key' => '',
|
|
|
|
|
'meta_value' =>'',
|
|
|
|
|
'post_type' => 'post',
|
|
|
|
|
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
|
|
|
|
));
|
|
|
|
|
|
2021-09-28 22:25:21 +03:00
|
|
|
// kuri_set($key, $mosts);
|
|
|
|
|
//}
|
|
|
|
|
|
2021-09-18 01:30:09 +03:00
|
|
|
|
|
|
|
|
# вывод поста
|
2021-09-27 00:07:02 +03:00
|
|
|
if( $mosts ):?>
|
2021-09-18 01:30:09 +03:00
|
|
|
|
2021-09-28 22:25:21 +03:00
|
|
|
<div class="mosts<?if ($args['subclass'] !== '') echo ' '.$args['subclass'];?>">
|
2021-09-20 01:07:53 +03:00
|
|
|
<h3 class="most_title">Самое читаемое</h3>
|
2021-09-27 00:07:02 +03:00
|
|
|
|
|
|
|
|
<?php foreach($mosts as $most):?>
|
|
|
|
|
<div class="most"><a href="<?=get_permalink($most); ?>"><?=$most->post_title;?></a></div>
|
|
|
|
|
<?php endforeach;?>
|
2021-09-18 01:30:09 +03:00
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
2021-09-27 00:07:02 +03:00
|
|
|
<?endif?>
|