کدش این هست
ببینید کسی متوجه میشه مشکل از کجاست:
$display = new WP_query();
$display->query('showposts='.$news['featuredn'].'&meta_key=featured');
global $wp_query; $wp_query->in_the_loop = true;
if ($display->have_posts()) :
include TEMPLATEPATH.'/templates/featured.tpl.php';
endif;
و داخل اون featured.tpl.php هم این رو داره:
<?php while ($display->have_posts()) : $display->the_post(); $do_not_duplicate[] = $post->ID; ?>
<div class="item">
<div class="item-contents">
<?php dt_thumb('width=430&height=247'); ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="overlay"></a>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="title"><?php the_title(); ?></a>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="date"><?php the_time('l, d F Y'); ?></a>
</div>
</div>
<?php endwhile; ?>
<ul class="slideposts">
<?php while ($display->have_posts()) : $display->the_post(); ?>
<li><?php dt_thumb('width=78&height=50&link=#'); ?></li>
<?php endwhile; ?>
</ul>