[shortcodeglut_woo_category]

April 13, 2026
Free Shortcodes
331 views
12 min read
Updated May 11, 2026

WooCommerce Category Products Shortcode

Complete Documentation for [shortcodeglut_woo_category] — Plugin Version 1.5.5

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.

Key Features:
  • 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"]
Required Parameter: The 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.

How to use: Pass the Template ID as the template parameter. Example: template="product_card_aqua". If omitted, product_card_basic is used.

Vertical Card Templates

product_card_basic
Product Card: Basic
Classic vertical product card with image on top and details below. The default template.
Vertical
product_card_aqua
Product Card: Aqua
Refreshing product card with aqua marine accent color.
Vertical
product_card_berry
Product Card: Berry
Colorful product card with berry-inspired indigo and pink accents.
Vertical
product_card_lavender
Product Card: Lavender
Romantic product card with lavender and rose accents.
Vertical
product_card_lime
Product Card: Lime
Zesty product card with lime green and pink color scheme.
Vertical
product_card_magenta
Product Card: Magenta
Dreamy product card with magenta and purple accents.
Vertical
product_card_sage
Product Card: Sage
Calming product card with sage and mint green colors.
Vertical
product_card_teal
Product Card: Teal
Refreshing product card with teal accent color.
Vertical
product_card_tropical
Product Card: Tropical
Tropical-themed product card with sunset-inspired colors.
Vertical
product_card_vibrant
Product Card: Vibrant
Eye-catching product card with vibrant green and orange colors.
Vertical

Horizontal Card Templates

product_card_horizontal_blue
Card: Horizontal Blue
Horizontal product card with blue accent color, image on left.
Horizontal
product_card_horizontal_cyan
Card: Horizontal Cyan
Horizontal product card with cyan accent color, details first.
Horizontal
product_card_horizontal_green
Card: Horizontal Green
Horizontal product card with green accent color, image on left.
Horizontal
product_card_horizontal_purple
Card: Horizontal Purple
Horizontal product card with purple accent color, image on right.
Horizontal

Template Tags Reference

The pre-built templates use these tags internally to dynamically display product data. These are listed for reference when building conditional logic or understanding template structure.

[product_id]
Product ID number
[product_title]
Product name
[product_permalink]
Product page URL
[product_image]
Product featured image (full HTML)
[product_image_url]
Product image URL only
[product_gallery]
Product gallery images
[product_price]
Product price HTML (includes sale price if applicable)
[product_regular_price]
Regular price (formatted)
[product_sale_price]
Sale price (only when on sale)
[product_short_description]
Product short description (trimmed to 20 words)
[product_description]
Product description (trimmed to 20 words)
[product_categories]
Product categories as linked text
[product_tags]
Product tags as linked text
[product_rating]
Star rating with Font Awesome icons
[product_rating_count]
Number of ratings in parentheses
[product_attributes]
Product attributes list (visible only)
[product_dimensions]
Product dimensions (L x W x H)
[product_weight]
Product weight with unit
[product_badge_sale]
Sale discount badge (e.g., -20%)
[sku]
Product SKU
[stock_status]
Stock status (instock / outofstock)
[stock_quantity]
Stock quantity number
[add_to_cart_url]
Add to cart URL
[cart_url]
Cart page URL
[btn_cart]
Add to Cart button (with AJAX support when applicable)
[btn_view]
View Product button

Conditional Tags

Conditional tags let pre-built templates show or hide content based on product state. Format: [condition:content to show]. If the condition is true, the content is displayed; otherwise it is removed.

[is_on_sale:…]
Show content if product is on sale
[is_not_on_sale:…]
Show content if product is NOT on sale
[is_in_stock:…]
Show content if product is in stock
[is_out_of_stock:…]
Show content if product is out of stock
[is_new:…]
Show content if product has _is_new meta set
[is_not_new:…]
Show content if product does NOT have _is_new meta
[is_featured:…]
Show content if product has _featured meta set
[is_not_featured:…]
Show content if product does NOT have _featured meta
[has_rating:…]
Show content if product has a rating above 0
[has_no_rating:…]
Show content if product has no ratings
[has_categories:…]
Show content if product has categories assigned
[has_no_categories:…]
Show content if product has no categories
[has_description:…]
Show content if product has a description
[has_no_description:…]
Show content if product has no description
[has_sale_price:…]
Show content if product has a sale price above 0
[has_regular_price:…]
Show content if product has a regular price above 0
Conditional tag example (used inside templates):
[is_on_sale:<span class="sale-label">On Sale!</span>]
[is_in_stock:<span class="stock-ok">In Stock</span>]

Tips & Best Practices

Finding Category Slugs:
Navigate to Products → Categories in your WordPress admin. The slug is shown in the “Slug” column. Slugs are case-sensitive and must match exactly.
Responsive Columns:
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 vs AJAX Pagination:
ajax="on" enables AJAX for toolbar filtering (search, sort). ajax_pagination="on" enables AJAX for pagination. You can enable either or both independently.
Performance:
Keep items_per_page reasonable (10–20) for large catalogs. Enable AJAX for smoother user experience without full page reloads.
Category Operators:
  • IN — Products from ANY of the specified categories (default)
  • AND — Products from ALL specified categories
  • NOT IN — Products NOT in the specified categories
  • EXISTS — Products where the category exists
  • NOT EXISTS — Products where the category does not exist
Toolbar Modes:
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