Hola gente, en mi blog Enlace eliminado tengo pestañas dónde la primera muestra los posts más populares, llamando populares a los que tienen más comentarios.
El código para llamar dichos posts es éste:
// Tabber: Get Most Popular Postsfunction tj_tabs_popular( $posts = 5, $size = 35 ) {
$popular = new WP_Query('orderby=comment_count&posts_per_page='.$posts);
while ($popular->have_posts()) : $popular->the_post();
?>
<li><?php tj_show_thumb($size, $size); ?>
<div class="info">
<a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><?php the_title(); ?></a>
<span class="meta">
<?php comments_popup_link('0 Comment', '1 Comment', '% Comments', 'comments-link', ''); ?></span></div>
<!--end .info-->
<div class="clear">
</div></li>
<?php endwhile;}
Alguien sabe como podría modificar tal código para que llame a los posts con más visitas?
Saludos y muchas gracias!.