WP SITES

3082 Coded Tutorials & 283 Plugins

Extended Products Shortcode for WooCommerce

$75.00

A WooCommerce plugin focused on price-based product sorting. It extends the WooCommerce products shortcode and adds support for sorting by price (cheapest first or most expensive first), with unlimited results by default. It also supports sorting by custom meta fields.

Features

  • Price-first design: sort by price using orderby="price"
  • Wrapper for WooCommerce’s products shortcode
  • Supports sorting by custom meta fields (numeric)
  • Uses WooCommerce’s native product display system

Usage

Basic Shortcode

[my_products]

With Parameters

[my_products category="packets" limit="8" columns="4"]

Parameters

This shortcode supports all standard WooCommerce products shortcode attributes, with emphasis on price sorting:

  • category – Product category slug (optional)
  • limit – Number of products to display (default: unlimited)
  • columns – Number of columns for product display (default: 4)
  • orderby – Order products by. Use price for price sorting (default: rand)
  • price – Sort by product price (use with orderby="price", numeric)
  • order – Order direction (default: DESC)
  • ids – Comma-separated list of product IDs
  • skus – Comma-separated list of product SKUs
  • on_sale – Show only products on sale (true/false)
  • best_selling – Show only best-selling products (true/false)
  • top_rated – Show only top-rated products (true/false)

Note: When using orderby="price", sorting is numeric based on the _price meta key.

Sorting by Price (Primary Use Case)

You can sort products by their price by setting orderby="price". This maps to the _price meta key and sorts numerically.

Example :

[my_products orderby="custom_field_name" order="ASC"]

Price Examples :

[my_products orderby="price" order="ASC"] (Cheapest first)

[my_products orderby="price" order="DESC"] (Most expensive first)

[my_products category="clothing" orderby="price" order="ASC" limit="12"]

Custom Meta Field Sorting (Optional)

You can sort by custom meta fields by specifying the meta field name in the orderby parameter. Sorting is numeric.

Standard sorting options: menu_order, title, date, rand, id
Custom meta fields: Any custom field name (numeric sort)

Examples

[my_products orderby="price" order="ASC" limit="10"]
[my_products orderby="price" order="DESC" category="electronics" columns="3"]
[my_products category="clothing" orderby="price" order="ASC" limit="12"]
[my_products limit="12" columns="3"]
[my_products on_sale="true" orderby="price" order="ASC"]
[my_products orderby="custom_priority" order="ASC" limit="10"]

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Contact Us If You Have Any Questions

Go back

Your message has been sent

Warning
Warning
Warning
Warning.