WP Query for WooCommerce
-
I created a special template a couple of years ago that uses wp_query to list blog posts. I am now trying to use this code for a website with WooCommerce products. I believe that WooCommerce products are a custom post type? So I should be able to slightly modify this script to do this? There is some special customization in here and that is why I am trying to use this method, but the stripped down basic part of the code is:
<?php $my_query = new WP_Query('showposts=30'); while ($my_query->have_posts()) : $my_query->the_post();?> <strong><a href='<?php the_permalink() ?>'><?php the_title('', '...', true, '35') ?></a></strong> <a href='<?php the_permalink() ?>'><?php echo get_the_post_thumbnail($page->ID, 'thumbnail'); ?></a> <?php the_excerpt(); endwhile; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘WP Query for WooCommerce’ is closed to new replies.