Shortcodes and blocks reference
Simple WishlistsUpdated
The plugin has three shortcodes and three matching blocks: the wishlist, the wishlist button and the counter. PRO adds a registry search shortcode. A list of these is also shown under Wishlists › Settings › Shortcodes & Blocks.
[swlp_wishlist]
Shows the shopper’s wishlist, or a shared wishlist when the page is opened from a share link. Put it on your wishlist page.
[swlp_wishlist view="table" per_page="12" header="no"]
view:gridortable. Defaults to the Default view setting.per_page: items to load before Load more. Defaults to the Items per page setting.header:nohides the coloured header. Defaultyes.
[swlp_button]
A wishlist button. Without an ID it uses the current product, so it works inside a product loop or on a product page.
[swlp_button id="123" variation="0" style="icon_text" show_count="yes"]
id: the product ID.variation: a variation ID, to save one variation.style:icon,icon_text,textorbutton.show_count:yesornofor the “people have saved this” line.
[swlp_counter]
The heart with a live count that links to the wishlist.
[swlp_counter show_label="yes" show_zero="no"]
show_label: show the label text next to the heart.show_zero: show the count when the wishlist is empty.
Attributes you leave out follow the settings on the Counter tab. Yes/no attributes accept yes, true or 1 for yes.
[swlp_registry_search] (PRO)
A form for finding a Public gift registry by title, owner name or the owner’s exact email. The optional title attribute sets the heading, for example [swlp_registry_search title="Find a gift registry"].
Blocks
- Wishlist: the same as
[swlp_wishlist]. Supports wide and full alignment. - Wishlist Button: inside a product template it uses that product. Elsewhere, enter a Product ID in the block settings. The Style option can follow your settings or use a set style.
- Wishlist Counter: with Show the “Wishlist” label and Show the count when the wishlist is empty options.


