<?php
$args = array(
'post_type' => 'product',
'meta_key' => '_featured',
'meta_value' => 'yes',
'posts_per_page' => 2
);
$featured_query = new WP_Query( $args );
if ($featured_query->have_posts()) :
while ($featured_query->have_posts()) :
$featured_query->the_post();
$product = get_product( $featured_query->post->ID ); ?>
<li class="featured-products-item">
<a><?php the_post_thumbnail();?></a>
<?php the_excerpt();;?>
</li>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); // Remember to reset
?>
<?php global $news_query;
$k=0;
$news_query = new WP_Query("post_type=partners&post_status=publish&posts_per_page=-1&orderby=date&order=DESC");
while ($news_query->have_posts()) : $news_query->the_post(); ?>
<div class="partner">
<div class="wrapper">
<div class="partner-about">
<h2><?php the_title(); ?></h2>
<p>
<?php the_excerpt(); ?>
</p>
<a class="fancybox" href="#p_<?php echo $k; ?>">Подробнее</a>
<div class="partner-content" id="p_<?php echo $k; $k++; ?>">
<h2><?php the_title(); ?></h2>
<p>
<?php the_content(); ?>
</p>
</div>
</div>
</div>
</div>
<?php endwhile; wp_reset_postdata(); ?>