Здравствуйте.
Использую плагин pageviewes для вывода количества просмотров статьи.
В сайд бар вывожу похожие статьи. Выводится заголовок и миниатюра. Хочу так что сделать, чтобы в сайдбар выводилось и колличество просмотров.
Как реализовать, не подскажете?
<div class="poxojie_zapisi">
<h3>Похожие записи:</h3>
<?php $tags = wp_get_post_tags($post->ID);
if ($tags) {
$tag_ids = array();
foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
$args=array(
'tag__in' => $tag_ids,
'orderby'=>rand,
'caller_get_posts'=>1,
'post__not_in' => array($post->ID),
'showposts'=>5
);
$my_query = new wp_query($args);
if( $my_query->have_posts() ) {
echo '<ul>';
while ($my_query->have_posts()) {
$my_query->the_post();
?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
<?php the_post_thumbnail(); ?><br /><?php the_title(); ?></a></li>
<?php
}
echo '</ul>';
}
wp_reset_query();
}
?></div>