Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 10th, 2013  |  syntax: PHP  |  size: 0.60 KB  |  views: 25  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.             $args = array( 'post_type' => 'product', 'posts_per_page' => 1, 'product_tag' => 'awesome', 'orderby' => '' );
  3.             $loop = new WP_Query( $args );
  4.             while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>
  5.               <div id="feat-img-contain">
  6.                        <a href="<?php echo get_post_meta($post->ID, 'vendor-url', true); ?>"> <?php if ( has_post_thumbnail() ) {
  7.                            the_post_thumbnail();}?></a>
  8.               </div><!--end feat-img-contain-->
  9.            <?php endwhile; ?>
  10.  
  11.             <?php wp_reset_query(); ?>
clone this paste RAW Paste Data