I would like to create a category loop for the Products in a Products Detail page. (below the product). The products would be from the same category that the Product Item is from.
It seems the normal category args don't work from the standard Wordpress args.
WPEC's custom Template tags such as wpsc_print_category_image()
or wpsc_print_category_name();
seem not to work in a custom setting.
Here is an example of what I am trying to do
<?php
$args = array( 'post_type' => 'wpsc-product','posts_per_page' => 999, 'orderby'=>'title','order'=>'ASC','category_id'=>'5' );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
//the_title();
echo '<div class="isotope-item box default_product_display product_view_';
echo wpsc_the_product_id();
echo '">';
echo '<img src="';
echo wpsc_the_product_image();
echo '"/>';
?>
<div class="prod-info-container">
<div class="prod-info">
<h3 class="prodtitle entry-title">
<?php if(get_option('hide_name_link') == 1) : ?>
<?php echo wpsc_the_product_title(); ?>
<?php else: ?>
<?php echo wpsc_the_product_title(); ?>
<?php endif; ?>
</h3>
<p>
<?php echo the_excerpt(); ?>
</p><!--close wpsc_description-->
<a class="view-detail" href="<?php the_permalink();?>">view</a>
</div>
</div>
<?php
echo '</div>';
endwhile;
?>
This gives me all the products but I want to limit to just one category.
Thank you.