Solved

How do I make a custom product loop in woocommerce just for category display?

Posted on 2015-01-29
1
282 Views
Last Modified: 2015-05-21
Hi,

I'm using WordPress and the Woocommerce plugin and I need to display the category loops differently from the main shop loop but can't work out how to do it.

The theme that I am using uses shortcodes to pull in the product loops. For example:

[product_category category="Courses" orderby="name" order="asc"]

Open in new window


I need to customise this and other category loops differently from the main shop which displays all products.

The main shop will remain as a 4 column grid but the category pages need to have a totally different layout and styling.

I've been all over the web and grepped for code and tags in the plugin dir but I just can't find any hint of what I need to do.

Can someone please point me in the right direction?

Thanks.
0
Comment
Question by:Letterpart
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 15

Accepted Solution

by:
eemit earned 500 total points
ID: 40580113
You can do the following:

Add columns attribute to the shortcode e.g:
[product_category category="Courses" orderby="name" order="asc" columns="3"]

Open in new window


Style it with CSS (add this to your child theme's style.css) e.g.:
.woocommerce.columns-3 ul.products li.product {
    float: left;
    margin: 0 3.8% 2.992em 0;
    padding: 0;
    position: relative;
    width: 29.4%;
}

Open in new window


You can also try to override content-product_cat.php template
by copying it to yourchildtheme/woocommerce/content-product_cat.php.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question