Use Shopping Cart Products in WP_Query?
Hey folks,
I'm struggling to get one thing working with the Shopping Cart Plugin. I'm using 1.6.9.4 and I understand that products are supported as a custom post type. I have a training page of a particular category of training seminars (Project Management) and embedded in the course details I'd like a bulleted list of all courses in that category.
Is this possible? I couldn't find any reference to how to use WP_Query to call products by category.
I'm moving to Shopping Cart from WooCommerce and this is the Query I'm using now to do the same thing:
[insert_php] $recent = new WP_Query("post_type=product&product_category=project-management&showposts=10&order=ASC"); while($recent->have_posts()) : $recent->the_post();?>
I'm struggling to get one thing working with the Shopping Cart Plugin. I'm using 1.6.9.4 and I understand that products are supported as a custom post type. I have a training page of a particular category of training seminars (Project Management) and embedded in the course details I'd like a bulleted list of all courses in that category.
Is this possible? I couldn't find any reference to how to use WP_Query to call products by category.
I'm moving to Shopping Cart from WooCommerce and this is the Query I'm using now to do the same thing:
[insert_php] $recent = new WP_Query("post_type=product&product_category=project-management&showposts=10&order=ASC"); while($recent->have_posts()) : $recent->the_post();?>
<li><a href="<?php the_permalink(); ?>"><strong><?php the_title(); ?> </strong></a></li>
<?php endwhile; [/insert_php]
In the screenshot below, you'll see in the red box what I'm trying to accomplish. I don't have room on the page for the grid layout (client won't let me change the layout), but I'd really like to have direct text links to the individual registration product page here.
Thanks in advance for any guidance you could offer!
Comments
Thanks for your post. I'll repeat my answer to your support ticket on the issue below: Please let us know if that helped at all, will you Pete? I look forward to your reply.
Kind regards,
Phil