Skip to content

Building a shoppable lookbook

This walkthrough builds a shoppable scene from a fresh install, then explains exactly how it behaves on the storefront.

  1. Go to Lookbooks > Add New.
  2. Give it a title (used internally and as the image alt text).
  3. Set the Featured image, the photo your products live in.

The Shoppable hotspots box shows the image as soon as the lookbook has a featured image when the edit screen loads. On a new lookbook, set the image and save the draft so it appears in the box.

In the Shoppable hotspots box:

  1. Click the image where a product appears. A numbered dot is placed there and a row is added with its X % and Y % (position from the top-left, 0-100). The first click fills the empty starter row instead of adding a second one.
  2. Drag a dot to move it, or type the X and Y values; the dot follows what you type.
  3. In the row’s Product field, search for the product to link (the WooCommerce product search).

+ Add hotspot adds a row at 50/50; Remove asks for confirmation and drops a row (the last row is cleared rather than removed, so the table is never empty). Rows without a product are discarded when you save.

Under WooCommerce > Lookwick, decide globally whether to show the price and the add-to-cart link (with an optional label override). These apply to every lookbook, see Configuration.

Find the lookbook’s ID by editing it (the post=123 value in the URL), then place the shortcode in any page or post:

[lookbook id="123"]

The same ID can be reused on any number of pages; each renders the same image and hotspots.

On Elementor (from version 1.2.0): search the widget panel for Shoppable Lookbook, drop it on the page and enter the lookbook ID. It renders exactly what the shortcode renders, and it only appears while Elementor is active.

There is no block for the block editor; there, use the shortcode in a Shortcode block.

Each hotspot renders as a numbered <button> absolutely positioned at its X/Y percentage. Activating one opens a product card:

  • The card uses the native Popover API (popover + popovertarget), so the browser handles open, close, click-outside dismiss and Escape with no script.
  • In a browser with the Popover API the bundled script only positions the open card near its marker, centred below it, flipped above when there is no room, and clamped to the viewport, and repositions it on resize, so the card never covers the product or runs off-screen. Where the Popover API is missing it also takes over open, close and Escape itself, so the card still works.
  • Each time a card opens, the script fires a lookbook:hotspot-opened event on the lookbook element and on document, carrying the lookbook ID, scene index, hotspot index and product ID.
  • The card shows the product thumbnail and title (both linking to the product page), the live price (if Price is on), and an add-to-cart link (if Add to cart link is on). The add-to-cart link only appears for a purchasable, in-stock product; otherwise the card shows a View product link instead.
  • Markers are real buttons: Tab reaches each one, Enter/Space opens its card.
  • Each marker carries an aria-label like View Linen Shirt and aria-haspopup="dialog"; the visible content is just the number, with the full label as screen-reader text. Screen-reader users hear the product name, not “button”.
  • The card is a role="dialog" labelled by the product name.
  • The focused marker shows a visible focus-visible outline, so keyboard users always see where they are.

If the browser lacks the Popover API, the script supplies a fallback: it toggles the card with the marker, tracks aria-expanded, closes others when one opens, and closes on Escape or a click outside. With JavaScript fully disabled the markers do nothing harmful and the image and page are unaffected.

A hotspot whose product is deleted, unpublished, or not a valid product is dropped at render, no marker is drawn. If every hotspot is skipped, or the lookbook has no featured image, or the master switch is off, the lookbook renders just the image or nothing at all. You can configure a scene gradually without ever showing a broken marker.

  • Fashion outfits, pin each garment in a styled photo.
  • Room sets, pin furniture and decor in an interior shot.
  • Gift guides, pin every item in a curated flat-lay.
  • Recipe shots, pin the ingredients in a finished-dish photo.

Lookwick registers no shortcodes other than [lookbook] and exposes two settings-screen hooks for add-ons (used by Lookwick Pro):

// Add a settings card inside the same form, after the core cards.
add_action( 'lookbook_admin_settings_after_cards', function ( array $settings, string $option ): void {
// $option is 'lookbook_settings'. Name fields as $option . '[my_key]'
// so they submit under the shared option.
}, 10, 2 );
// Keep your own keys when the core sanitiser cleans the option on save.
add_filter( 'lookbook_sanitize_settings', function ( array $clean, array $raw ): array {
$clean['my_key'] = ! empty( $raw['my_key'] );
return $clean;
}, 10, 2 );

The sanitiser rebuilds the option from a fixed set of keys, so any key you add through lookbook_admin_settings_after_cards must be re-attached in lookbook_sanitize_settings or it is dropped on save.