37 lines
889 B
PHP
37 lines
889 B
PHP
<?php
|
|
|
|
//$key = 'vij_mosts';
|
|
|
|
//if (!$mosts = kuri_set($key)) {
|
|
|
|
$mosts = get_posts( array(
|
|
'numberposts' => 3,
|
|
'post__in' => get_option( 'sticky_posts' ),
|
|
'orderby' => 'date',
|
|
'order' => 'DESC',
|
|
'include' => array(),
|
|
'exclude' => array(),
|
|
'meta_key' => '',
|
|
'meta_value' =>'',
|
|
'post_type' => 'post',
|
|
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
|
));
|
|
|
|
// kuri_set($key, $mosts);
|
|
//}
|
|
|
|
|
|
# вывод поста
|
|
if( $mosts ):?>
|
|
|
|
<div class="mosts<?if ($args['subclass'] !== '') echo ' '.$args['subclass'];?>">
|
|
<h3 class="most_title">Самое читаемое</h3>
|
|
|
|
<?php foreach($mosts as $most):?>
|
|
<div class="most"><a href="<?=get_permalink($most); ?>"><?=$most->post_title;?></a></div>
|
|
<?php endforeach;?>
|
|
|
|
</div>
|
|
|
|
<?endif?>
|