Help · Journal and more

Put wine cards on your website

How to put Wine Companion's wine cards on your own website, and which cards you can show.

The widget lets you show Wine Companion's wine cards on your own site: a blog post, a shop's product page, a course or a digital menu. The cards use the same wine data as the app, and each one links to its full page in Wine Companion. Open the widget page to see live examples and copy the code.

What a card can show

You choose the card type with the type setting:

  • grape (the default): colour, origin, description, structure and signature aromas
  • blend: colour, region, description, grapes, structure and aromas
  • aroma: origin, aroma family and description
  • winemaking: category, definition and the aromas the method creates
  • country: description, signature grapes and climate

Every card ends with Learn more, which opens the entry in Wine Companion in a new tab.

Add a card

  1. On the widget page, go to Quick start and select Copy.
  2. Paste the two lines into your page's HTML: one loads the widget script, the other places a card.
  3. Pick what the card shows. Give it a slug for one specific entry (the same name as in the entry's address in Wine Companion, such as riesling), or random for a random entry of that type.

The Configuration table on the widget page lists every setting. The ones you will use most:

  • difficulty limits random cards to beginner, intermediate or advanced entries.
  • locale sets the language, en or de. theme sets light or dark.
  • rotate-interval switches a random card to a new entry after that many seconds.
  • transition picks the animation for that switch: flip, crossfade, slide or scale-blur. Smooth transitions on the widget page shows all four.
  • opacity makes the card background see-through, from 0 to 1.

To give every card on a page the same language, theme or animation, use the Global Configuration snippet below the table.

Flashcards

The widget also has a flashcard version: write wine-flashcard in place of wine-card in the code. Its front gives clues (aromas for a grape or a winemaking method, grapes for a blend or a country) and asks what it is. Click it, or press Enter or Space, to turn it over and see the answer. An aroma card shows its name on the front and its description on the back. Flashcards take the same settings as the other cards.

If a card shows "Item not found"

Check that type is one of the five types above and that the slug belongs to that type. A grape slug does not work on a blend card.

Related help