Shortcodes: Categories

Short Codes are a great way to display shop pages anywhere on your site, for more information on short codes you can look at the documentation.

Otherwise please find a complete list of category shortcodes below, additional arguments can be found and the bottom and incorporated into these shortcodes.

Short code:

[php][wpsc_products category_id='4'][/php]


Any bugs or Issues: none

What it does: Will display all products of the category by ID 4

Image or result:

Short code:

[php][wpsc_products category_url_name='test-category'][/php]

Any bugs or Issues: none

What it does: Will display all products of the category slug “test-category”

Image or result:

Arguments list:

Argument: limit_of_items

Description: Sets the number of products to display

Example:

[php][wpsc_products category_url_name='test-category' limit_of_items='5'][/php]

Any bugs or Issues: none

What it does: Will display 5 products of the category slug “test-category”

Argument: number_per_page

Description: Sets the number of products to display

Example:

[php][wpsc_products category_url_name='test-category' number_per_page='4'][/php]

Any bugs or Issues: none

What it does: Will display 4 products of the category slug “test-category”

Argument: sort_order

Description: Change the sort order of the list of products (either ascending or descending). The default is ascending.

Valid values: name, dragndrop, price, ID, author,date, title, modified, parent, rand, comment_count

Example:

[php][wpsc_products category_url_name='test-category' number_per_page='8' sort_order='name'][/php]

Any bugs or Issues: none

What it does: Will display 8 products of the category slug “test-category” ordered by name ascending

Argument: order

Description: Sort order for products (either ascending or descending). The default is ascending.

Valid values: asc, desc

Example:

[php][wpsc_products category_url_name='test-category' number_per_page='16' sort_order='price' order='desc'][/php]

Any bugs or Issues: none

What it does: Will display 16 products of the category slug “test-category” ordered by price descending