[shortcodeglut_woo_category]
WooCommerce Category Products Shortcode
Complete Documentation for [shortcodeglut_woo_category] — Plugin Version 1.5.5
Table of Contents
Overview
The WooCommerce Category Products shortcode displays products from one or more WooCommerce categories with customizable layouts, filtering, sorting, and pagination. Products are rendered using pre-built WooTemplates — professionally designed product card styles you can choose from.
- Display products from single or multiple WooCommerce categories
- Responsive grid layouts with separate desktop, tablet, and mobile column settings
- Built-in toolbar with search, sort by (date, name, price, rating, popularity, sales), and order direction
- AJAX-powered filtering and pagination (individually toggleable)
- 14 pre-built WooTemplates — vertical and horizontal product card styles
- Category header with custom icon, title, and description
- Flexible category query operators (IN, NOT IN, AND, EXISTS, NOT EXISTS)
Basic Usage
[shortcodeglut_woo_category categories="your-category-slug"]
categories parameter is required. You must provide at least one category slug (or ID with cat_field="id") for the shortcode to work.
Parameters Reference
| Parameter | Type | Default | Description |
|---|---|---|---|
| categories | string | required | Category slug(s) or ID(s) to display products from. Comma-separated for multiple. |
| cat_field | string | slug | Field to identify categories: slug or id |
| operator | string | IN | Query operator: IN, NOT IN, AND, EXISTS, NOT EXISTS |
| icon | string | empty | Custom icon URL for the category header. Falls back to category thumbnail if empty. |
| icon_width | integer | 64 | Icon width in pixels |
| title | string | empty | Custom title text. Any text is displayed as-is. Leave empty for no title. |
| desc | string | empty | Custom description, or 1 to auto-display the category description |
| items_per_page | integer | 10 | Number of products per page |
| orderby | string | date | Sort by: id, title, date, modified, price, total_sales, rating, popularity |
| order | string | DESC | Sort direction: ASC or DESC |
| template | string | product_card_basic | Pre-built WooTemplate ID for product card display (see Templates section) |
| toolbar | string | 1 | Toolbar display: 1 (full with header), 0 (hidden), or compact (no header) |
| paging | boolean | 1 | Show pagination: 1 or 0 |
| cols | integer | 3 | Product columns on desktop (valid: 1, 2, 3, 4, 6) |
| colspad | integer | 1 | Product columns on tablet (valid: 1, 2, 3, 4, 6) |
| colsphone | integer | 1 | Product columns on mobile (valid: 1, 2, 3, 4, 6) |
| ajax | string | off | AJAX-powered toolbar filtering (search, sort): on or off |
| ajax_pagination | string | off | AJAX-powered pagination (no page reload): on or off |
Usage Examples
Example 1: Single Category with Defaults
[shortcodeglut_woo_category categories="electronics"]
Displays products from the “electronics” category using the default template (product_card_basic), 3 columns on desktop, 10 per page, with toolbar.
Example 2: Multiple Categories with Category Header
[shortcodeglut_woo_category categories="electronics,accessories" title="Electronics & Accessories" desc="1"]
Displays products from both categories. Shows “Electronics & Accessories” as the title and auto-displays the category description.
Example 3: Responsive Grid with Aqua Template
[shortcodeglut_woo_category categories="fashion" cols="4" colspad="2" colsphone="1" items_per_page="12" template="product_card_aqua"]
4-column grid on desktop, 2 on tablet, 1 on mobile. Uses the Aqua pre-built template with 12 products per page.
Example 4: Sorted by Price with AJAX Filtering
[shortcodeglut_woo_category categories="sale-items" orderby="price" order="ASC" ajax="on" template="product_card_tropical"]
Products sorted by lowest price first with AJAX-powered toolbar filtering. Uses the Tropical template.
Example 5: Using Category IDs
[shortcodeglut_woo_category categories="15,22" cat_field="id" operator="IN"]
Displays products from categories with IDs 15 and 22. Useful when slugs are complex or may change.
Example 6: Exclude Categories with Horizontal Template
[shortcodeglut_woo_category categories="uncategorized" operator="NOT IN" template="product_card_horizontal_blue"]
Displays all products that are NOT in the “uncategorized” category using the Horizontal Blue template.
Example 7: Compact Toolbar with AJAX Pagination
[shortcodeglut_woo_category categories="new-arrivals" toolbar="compact" ajax_pagination="on" items_per_page="8"]
Compact toolbar (no category header) with smooth AJAX pagination. 8 products per page.
Example 8: Hidden Toolbar, Sorted by Popularity
[shortcodeglut_woo_category categories="featured" toolbar="0" orderby="popularity" paging="0" template="product_card_vibrant"]
No toolbar, no pagination. Shows all featured products sorted by popularity using the Vibrant template.
Example 9: Full AJAX with Custom Icon
[shortcodeglut_woo_category categories="gaming" icon="https://example.com/icons/gaming.png" title="Gaming Gear" ajax="on" ajax_pagination="on" cols="3" template="product_card_berry"]
Full AJAX experience (filtering + pagination without reloads) with a custom category icon and the Berry template.
Pre-Built Templates
Choose from 14 professionally designed product card templates. Use the template parameter with the Template ID shown below. Templates are ready to use — no customization needed.
template parameter. Example: template="product_card_aqua". If omitted, product_card_basic is used.
Vertical Card Templates
Horizontal Card Templates
Tips & Best Practices
Navigate to Products → Categories in your WordPress admin. The slug is shown in the “Slug” column. Slugs are case-sensitive and must match exactly.
Use
cols (desktop), colspad (tablet), and colsphone (mobile) together for responsive layouts. Valid values are: 1, 2, 3, 4, 6 (Bootstrap 12-column grid system). Invalid values fall back to sensible defaults.
ajax="on" enables AJAX for toolbar filtering (search, sort). ajax_pagination="on" enables AJAX for pagination. You can enable either or both independently.
Keep
items_per_page reasonable (10–20) for large catalogs. Enable AJAX for smoother user experience without full page reloads.
IN— Products from ANY of the specified categories (default)AND— Products from ALL specified categoriesNOT IN— Products NOT in the specified categoriesEXISTS— Products where the category existsNOT EXISTS— Products where the category does not exist
toolbar="1" shows the full toolbar including category header (icon, title, description). toolbar="compact" shows search and sort controls without the category header. toolbar="0" hides everything.
Frequently Asked Questions
Q: Why isn’t the shortcode displaying any products?
A: Make sure you’ve provided the correct category slug in the categories parameter. Category slugs are case-sensitive and must match exactly. Also verify that published products exist in the specified category.
Q: Can I display products from multiple categories?
A: Yes! Use comma-separated slugs: categories="electronics,fashion,accessories" or IDs with cat_field="id": categories="15,22" cat_field="id"
Q: How do I change the product card style?
A: Use the template parameter with any of the 14 pre-built template IDs. Example: template="product_card_aqua". See the Pre-Built Templates section for all options.
Q: What’s the difference between toolbar=”1″ and toolbar=”compact”?
A: toolbar="1" (full) shows the category header (icon, title, description) plus search/sort controls. toolbar="compact" shows only the search/sort controls without the header.
Q: Can I hide the toolbar?
A: Yes, set toolbar="0" to hide the toolbar completely.
Q: What does AJAX mode do?
A: ajax="on" enables AJAX for toolbar actions (search, sort) so results update without a page reload. ajax_pagination="on" enables AJAX for page navigation. They work independently — enable one or both.
Q: What column values are valid?
A: The grid uses a 12-column Bootstrap system. Valid values are: 1, 2, 3, 4, 6. Any invalid value falls back to 3 for desktop, 2 for tablet, 1 for mobile.
Q: How do I exclude products from a category?
A: Use operator="NOT IN" with the categories you want to exclude. Example: categories="uncategorized" operator="NOT IN"
Q: Can I use a custom category icon?
A: Yes, pass an image URL via the icon parameter. If empty, it automatically uses the category thumbnail set in WooCommerce.
ShortcodeGlut — WooCommerce Product Shortcodes Plugin
Version 1.5.5 | Last Updated: May 2026
