[shortcodeglut_archive_table]

May 11, 2026
Free Shortcodes
102 views
8 min read
Updated May 11, 2026

WooCommerce Table List Shortcode

Complete Documentation for [shortcodeglut_archive_table] — Plugin Version 1.5.5

Overview

The Table List shortcode displays WooCommerce products in a compact, sortable table/list layout — similar to a file manager or archive view. Each row shows a product with customizable columns, sortable headers, and an Add to Cart button with AJAX support.

Key Features:
  • Compact table/list layout with configurable columns
  • Sortable column headers (click to sort by any column)
  • Product thumbnail icons with adjustable size
  • SKU display support
  • AJAX Add to Cart with instant “View Cart” button transformation
  • AJAX pagination (no page reload)
  • Category filtering and product exclusion
  • Optional section title and breadcrumb
  • Fully responsive — adapts to all screen sizes

Basic Usage

[shortcodeglut_archive_table]

Displays all products in a table with default columns: Icon, Title, Price, Date, and Actions. Sorted by title ascending, 9 per page with pagination.

[shortcodeglut_archive_table title="All Products" columns="icon|title|price|actions" colheads="Product|Price|Actions"]

Custom table with a title, three visible columns, and custom headers.

Parameters Reference

Parameter Type Default Description
order_by string title Sort field: title, date, price
order string ASC Sort direction: ASC or DESC
items_per_page integer 9 Products per page
columns string icon|title|price|date|actions Table columns using pipe-separated field names (see Column Fields)
colheads string Product|Price|Date|Actions Column header labels using pipe-separated text. Must match the number of data columns (excluding icon).
paging boolean 1 Show pagination: 1 or 0
ajax string off AJAX pagination: on or off
category string empty Filter by a single category slug. Leave empty for all products.
exclude string empty Comma-separated product IDs to exclude. Example: exclude="12,34,56"
show_icon boolean 1 Show product thumbnail icon: 1 or 0
icon_width integer 44 Icon width/height in pixels (square)
show_sku boolean 1 Show SKU below the product title: 1 or 0
show_breadcrumb boolean 0 Show breadcrumb (Home / All Products): 1 or 0
title string empty Section title displayed above the table. Leave empty for no title.

Column Fields

Use these field names in the columns parameter, separated by pipes (|). The icon field is rendered separately and does not need a header in colheads.

icon
Product thumbnail image (rendered as the first column, no header needed)
title
Product name as a link (includes SKU below if show_sku is enabled)
price
Product price HTML (includes sale price if applicable)
date
Product publish date (format: M j, Y)
actions
Add to Cart button (Font Awesome cart icon + text)
stock
Stock status: “In Stock” or “Out of Stock” with color coding
category
Product categories as linked text
excerpt
Product short description (trimmed to 15 words)
rating
Star rating (WooCommerce rating HTML) or “Not yet rated”
sales
Total sales count (e.g., “42 sold”)
sku
Standalone SKU column (shows “N/A” if empty)
attributes
Visible product attributes (name: value format)
Column and Header Matching: The colheads count must match the number of data columns (excluding icon). Example: columns="icon|title|price|actions" needs 3 headers: colheads="Product|Price|Actions".

Usage Examples

Example 1: Default Table (All Products)

[shortcodeglut_archive_table]

Displays all products in a table with icon, title, price, date, and actions columns. Sorted alphabetically, 9 per page.

Example 2: Minimal Product List

[shortcodeglut_archive_table columns="icon|title|price|actions" colheads="Product|Price|Cart" show_sku="0"]

Clean 3-column table (after icon) with no SKU. Great for simple product catalogs.

Example 3: Detailed Table with Stock and Rating

[shortcodeglut_archive_table columns="icon|title|price|stock|rating|actions" colheads="Product|Price|Status|Rating|Cart" title="Product Catalog"]

Full-featured table with stock status, ratings, and a section title.

Example 4: Category Filtered, AJAX Pagination

[shortcodeglut_archive_table category="electronics" ajax="on" items_per_page="15" title="Electronics"]

Shows only electronics products with smooth AJAX pagination, 15 per page.

Example 5: Sorted by Price, No Icons

[shortcodeglut_archive_table order_by="price" order="ASC" show_icon="0" columns="title|price|category|actions" colheads="Product|Price|Category|Cart"]

Products sorted by lowest price first, no thumbnail icons, with category column added.

Example 6: Sales-Focused Table

[shortcodeglut_archive_table columns="icon|title|price|sales|rating|actions" colheads="Product|Price|Sold|Rating|Cart" order_by="date" order="DESC" title="New Arrivals"]

Shows newest products first with sales count and rating columns. Includes section title.

Example 7: Exclude Products, Large Icons

[shortcodeglut_archive_table exclude="5,12,23" icon_width="64" columns="icon|title|price|stock|actions" colheads="Product|Price|Stock|Cart"]

Excludes specific product IDs with larger 64px icons and stock status column.

Example 8: Compact — No Pagination, Fixed Count

[shortcodeglut_archive_table paging="0" items_per_page="5" order_by="date" order="DESC" show_breadcrumb="1"]

Shows the 5 newest products with no pagination. Includes breadcrumb navigation.

Tips & Best Practices

Sortable Headers:
Each column header displays a sort indicator. Visitors can click headers to sort the table by that column. Sorting works via AJAX — no page reload needed.
Column Layout:
The table uses CSS Grid for layout. Icon width is fixed (set by icon_width), and data columns share the remaining space equally (1fr each). This keeps the layout balanced regardless of content length.
Add to Cart Behavior:
The Add to Cart button uses AJAX. After adding a product, the button transforms into a “View Cart” link automatically — no page reload needed.
Matching Columns and Headers:
Always ensure your colheads count matches the number of data columns (everything in columns except icon). Mismatches will result in misaligned headers.
Custom Fields:
The columns parameter supports an extensible field system. Unknown field names trigger the shortcodeglut_table_list_field action hook, allowing developers to add custom columns.
Performance:
For large catalogs, keep items_per_page between 9–25. The table layout is lightweight and renders efficiently even with many columns.

Frequently Asked Questions

Q: Why isn’t the table showing any products?

A: Verify that you have published WooCommerce products. If using the category parameter, make sure the slug matches exactly (case-sensitive).

Q: How do I customize which columns appear?

A: Use the columns parameter with pipe-separated field names. Example: columns="icon|title|price|stock|actions". Match the headers with colheads="Product|Price|Stock|Cart".

Q: Can I hide the product icons?

A: Yes, set show_icon="0" to hide the thumbnail column entirely.

Q: How do I change the icon size?

A: Use the icon_width parameter. Default is 44px. Example: icon_width="64" for larger icons.

Q: Can visitors sort the table?

A: Yes. All column headers are clickable for sorting. A sort indicator (up/down arrows) is shown on each header.

Q: How does the Add to Cart button work?

A: It uses WooCommerce’s AJAX add-to-cart. After adding a product, the button automatically transforms into a “View Cart” link without reloading the page. Out-of-stock or non-purchasable products do not show the button.

Q: Can I show SKU in its own column?

A: Yes. Use the sku field in columns for a standalone SKU column. The show_sku="1" parameter shows SKU under the title column instead.

Q: What’s the difference between this and [shortcodeglut_grid]?

A: The Grid shortcode displays products as visual cards in a responsive grid. The Table List shows products in a compact row-based table with sortable headers — ideal for catalogs, archives, and data-heavy product listings.

ShortcodeGlut — WooCommerce Product Shortcodes Plugin

Version 1.5.5 | Last Updated: May 2026