fervor [>]CODING & CURIOSITY
FERVOR LEARNING SYSTEMTUTORIALS
← WordPress

WordPress / 6 MIN READ

Woo Commerce Product Sorting

Sorting WooCommerce Products by Category

From the original Fervor library. Examples may use older package versions.

Tutorial: Sorting WooCommerce Products into Categories

WooCommerce is a powerful WordPress plugin for creating and managing an online store. Organizing your products into categories is crucial for providing a seamless shopping experience. This tutorial walks you through sorting WooCommerce products into categories.


Table of Contents

  1. Understanding WooCommerce Categories
  2. Creating Categories
  3. Assigning Products to Categories
  4. Displaying Categories on the Shop Page
  5. Sorting Products within Categories
  6. Tips and Best Practices

1. Understanding WooCommerce Categories

Categories in WooCommerce are used to group similar products, making it easier for customers to browse your store. For instance:

  • A clothing store might have categories like Men’s Clothing, Women’s Clothing, and Accessories.
  • Categories can have subcategories (e.g., Men’s ClothingT-Shirts).

2. Creating Categories

Follow these steps to create product categories:

  1. Access the WooCommerce Dashboard:

    • Go to your WordPress admin panel.
    • Navigate to Products > Categories.
  2. Add a New Category:

    • Enter the Category Name (e.g., “Shoes”).
    • Set a Slug (optional; this will appear in the URL).
    • Assign a Parent Category if this is a subcategory.
    • Add a Description (optional; appears on category pages depending on your theme).
    • Upload a Thumbnail for the category (optional but recommended for visual appeal).
  3. Save:

    • Click Add New Category.

3. Assigning Products to Categories

You can assign products to categories in two ways:

Method 1: While Creating/Editing a Product

  1. Navigate to Products > All Products.
  2. Click Edit under the product you want to categorize.
  3. In the Product Data section, find the Product Categories box.
  4. Select one or more categories to assign the product to.
  5. Click Update.

Method 2: Bulk Assign Categories

  1. Navigate to Products > All Products.
  2. Select multiple products using the checkboxes.
  3. Choose Edit from the Bulk Actions dropdown and click Apply.
  4. In the Bulk Edit panel, select categories under the Product Categories option.
  5. Click Update.

4. Displaying Categories on the Shop Page

To display categories on your WooCommerce shop page:

  1. Go to WooCommerce Settings:

    • Navigate to Appearance > Customize > WooCommerce > Product Catalog.
  2. Set Shop Page Display:

    • Under Shop Page Display, choose Show categories or Show categories and products.
  3. Save Changes:

    • Click Publish to save your settings.

Now, customers will see categories displayed on the shop page.


5. Sorting Products Within Categories

Method 1: Using Default Sorting

WooCommerce offers default sorting options such as:

  • Menu Order: Arrange products manually.
  • Popularity: Sort by sales.
  • Average Rating: Sort by customer reviews.
  • Latest: Display the newest products first.
  • Price: Sort by ascending or descending price.

To set the default sorting:

  1. Go to WooCommerce > Settings > Products > Display.
  2. Choose a default sorting option under Default product sorting.

Method 2: Manually Sort Products

  1. Navigate to Products > All Products.
  2. Click on the Sorting tab at the top of the page.
  3. Drag and drop products into your preferred order.

6. Tips and Best Practices

  • Use Clear and Descriptive Names: Ensure your categories are easy to understand.
  • Limit the Number of Categories: Too many categories can overwhelm customers. Group similar products logically.
  • Add Subcategories: Use subcategories to further organize large categories.
  • Optimize Category Descriptions: Include keywords to improve SEO.
  • Highlight Popular Categories: Display best-selling categories prominently on your homepage.

Conclusion

Organizing your WooCommerce products into categories not only improves the shopping experience but also enhances your store’s SEO and usability. By following the steps in this guide, you can effectively create, assign, and manage product categories in WooCommerce.

The decision to import products using WooCommerce’s native importer or a dedicated import plugin (e.g., WP All Import) depends on the complexity of your requirements and the features you need. Here’s a breakdown of both options to help you decide which is better for your scenario.


1. WooCommerce Native Importer

Pros

  • Free and Built-In: Comes pre-installed with WooCommerce, so no additional costs or plugins are needed.
  • Simple Setup: Ideal for straightforward product imports without custom fields or advanced logic.
  • Basic Field Mapping: Allows mapping of standard WooCommerce fields (e.g., title, SKU, price, stock, categories).
  • Category Support: You can include categories in the CSV, and it will create or assign them automatically.

Cons

  • Limited Custom Fields: It does not support importing custom meta fields unless they are manually added with custom code.
  • No Conditional Logic: You cannot dynamically assign categories or values based on specific conditions.
  • No Scheduling: Doesn’t support automated recurring imports.
  • No Advanced Data Handling: Handling variable products, grouped products, or large inventories can be cumbersome.

Best For

  • Small to medium-sized stores with simple products.
  • Importing standard product data like name, price, stock, SKU, and categories.

2. Using a Dedicated Import Plugin (e.g., WP All Import)

Pros

  • Custom Fields Support: Fully supports importing custom meta fields and custom taxonomies, such as those added by plugins or themes.
  • Conditional Logic: Assign categories or other fields dynamically based on custom logic or rules (e.g., “If Material = Cotton, assign category Clothing”).
  • Variable Products: Better handling of complex product types, like variable or grouped products.
  • Data Validation: Offers advanced options to validate and clean imported data.
  • Scheduling and Automation: Ideal for recurring imports, such as daily inventory updates from suppliers.
  • Large Inventory Support: Can handle large product catalogs with better performance.

Cons

  • Cost: Most plugins with advanced features, like WP All Import Pro, require a paid license.
  • Learning Curve: More options mean it might take longer to set up and understand.
  • Third-Party Dependency: Requires installing and maintaining an extra plugin.

Best For

  • Stores with complex requirements, such as:
    • Custom fields and taxonomies.
    • Recurring or automated imports.
    • Large inventories or frequent updates.
    • Variable products or advanced product data.

Key Differences

Feature WooCommerce Importer WP All Import (or Similar Plugins)
Custom Fields Limited support Full support
Dynamic Category Mapping No Yes
Recurring Imports No Yes
Variable Products Basic Advanced
Performance with Large Data Moderate Optimized
Ease of Use Beginner-friendly Advanced, requires setup
Cost Free Paid for full features

Conclusion: Which Should You Use?

  • Choose WooCommerce Native Importer if:

    • Your product data is simple (e.g., title, price, categories, stock).
    • You don’t need custom fields or advanced mappings.
    • You’re working with a small product catalog.
  • Choose a Dedicated Import Plugin if:

    • You’re importing custom fields, taxonomies, or complex product types.
    • You want to dynamically assign categories or other values.
    • You manage a large inventory or require recurring imports.
    • You want better control, performance, and error handling.

Recommendation

If you’re managing a store with custom fields (e.g., sorting into categories based on field values) or advanced requirements, a plugin like WP All Import is the better choice. For simpler stores, WooCommerce’s native importer is sufficient.

Keep your curiosity going.Explore more WordPress →
287 TUTORIALS · 22 TOPICSREADY