Shortcodes

WordPress uses Shortcodes to easily include other content or special functionality into a WordPress post or page. A shortcode is a simple macro code that can be added to a post or page. When a page (or post) with a shortcode is viewed on the website, the code is automatically replaced with whatever information, content or special functionality it represents.

For example, in WordPress this shortcode will add a photo gallery to a WordPress post or page:

[gallery]

Additionally, shortcodes can be used with options:

[gallery option1='value1' option2='value2']

Shopp provides several shortcodes for including content from your product catalog into posts, pages or even other Shopp products.

[catalog-product]

The [catalog-product] includes a Shopp product.

[catalog-buynow]

The [catalog-buynow] includes a summary product with a buy now button.

Shortcode Usage

The [catalog-product] and [catalog-buynow] shortcodes can include the desired product by id, slug, or name:

[catalog-buynow id='9']
[catalog-product slug='my-product']
[catalog-product name='My Product']

[catalog-collection]

The [catalog-collection] includes a Shopp product collection.

The [catalog-collection] shortcode can include the desired collection by id. A preprogrammed collection can be loaded by slug.

[catalog-collection id='1']

To include the catalog products collection:

[catalog-collection slug='catalog']

To include the new products collection:

[catalog-collection slug='new']

To include the featured products collection:

[catalog-collection slug='featured']

To include the on sale products collection:

[catalog-collection slug='onsale']

To include the promo products collection, include the id of the promotion:

[catalog-collection slug='promo' id='1']

To include the bestsellers products collection:

[catalog-collection slug='bestsellers']

To include the search-results products collection, also include the search terms (see the Search section):

[catalog-collection slug='search-results' search='books >$100']

To include the tag products collection, also include the tag name:

[catalog-collection slug='tag' tag='playstation']

To include the related products collection in one of your product’s description:

[catalog-collection slug='related']

You can also specify a product for the related products collection (by id or slug), or for the most recent item added to the cart:

[catalog-collection slug='related' product='my-product']
[catalog-collection slug='related' product='recent-cartitem']

To include the also-bought (cross selling) products collection in one of your product’s description:

[catalog-collection slug='also-bought']

You can also specify the also-bought products collection for a specified products, or for the most recent item added to the cart:

[catalog-collection slug='also-bought' product='my-product']
[catalog-collection slug='also-bought' product='recent-cartitem']

To include a random products collection:

[catalog-collection slug='random']

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar