Elimde en çok okunan postları sıralayan bir kod var ama ben bunu kategoriye göre limitlendirmek istiyorum. örneğin ID:19 olan haber kategorisinin en çok okunanlarını listelemek istiyorum.
Kodu şu:
<?php query_posts('v_sortby=views&v_orderby=desc&showposts=6') ?>
<?php while (have_posts()) : the_post(); ?>
<div>
<div class="left icerikImg">
<a href="<?php the_permalink() ?>" >
<?php if( get_post_meta($post->ID, "resim", true) ): ?>
<img src="<?php echo mstfturkgoster(); ?>" alt="" width="55" height="57" alt="<?php the_title(); ?>"/>
<?php else: ?>
<img src="<?php bloginfo('template_directory'); ?>/images/logo.png" width="55" height="57" alt="<?php the_title(); ?>"/>
<?php endif; ?>
</a>
</div>
<div class="left icerikText">
<a href="<?php the_permalink() ?>" ><?php the_title(); ?>
<?php the_content_rss('', TRUE, '', 10); ?>...</a>
</div>
<div class="clear icerikLine"></div>
</div>
<?php endwhile; ?>ne gibi bir değişiklik yapmam gerekiyor. Şimdiden teşekkür ederim.