THE SHORTCODE

The shortcode

The same cards, anywhere WordPress takes a shortcode.

The ShopCard modules are the easy way to place cards in Divi. The [shopcard] shortcode does the same job anywhere else, for example in a Divi Text module.

ONE ITEM

Show a single product

Use the item’s ID: [shopcard item="12"]. You will find the ID in your browser’s address bar while you edit the item - it is the number after post=.

A COLLECTION

Show a collection

[shopcard collection="34"] shows the collection as a grid of cards, in its saved order. The ID comes from the address bar in the same way.

CHOOSE WHAT SHOWS

Switch parts off

Add image, retailer, description, price, button or disclosure set to no to hide that part, for example [shopcard collection="34" description="no" price="no"]. Add heading="h2" to change the heading level of the product name; h3 is the default.

GOOD TO KNOW

Shortcode or module?

IN DIVI, USE THE MODULES

Inside the Divi builder the modules are better: they show a live preview, take presets and give you the whole Design tab. The shortcode uses ShopCard’s default card styling.

FOR DEVELOPERS

Shortcode output is wrapped in a div with the classes shopcard and shopcard--shortcode, so you can target it in your own CSS.

Also in this guide

Troubleshooting