решено — сделал так:
if (in_category('4'))
{
$posts = query_posts($query_string . '&posts_per_page=5');
while(have_posts()): the_post();
if( $post->ID == $do_not_duplicate ) continue; $do_not_duplicate = $post->ID; ?>
<!-- блок портфолио -->
<div class="cat-service">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div id="thumb"><?php the_post_thumbnail(); ?></div>
<div class="cat-service-info">
<div class="cat-service-comments"> <i>Комментариев к посту: </i>
<a href="<?php the_permalink() ?>#comments">
<?php comments_number('0', '1', '%'); ?>
</a>
</div>
<div id="cat-service-sep"><i>Находиться в:</i></div><?php the_category()?></div>
</div>
<?php endwhile;
всем спасибо..
странно, что вроде бы на таком форуме никто даже и не решил хоть что-то написать, хотя и я наверное не лучше
Вставлял в код
wp_reset_postdata();
перед циклом loop — не помогло