View Categories

Wishlist Shortcodes Reference

These are the shortcodes provided by Wishlist for WooCommerce. Add any of them to a page, post, or widget using the standard WordPress shortcode syntax. Each shortcode can be switched on or off under WPFactory > Wishlist > Shortcodes (also reachable at WooCommerce > Settings > Wishlist > Shortcodes).

Available shortcodes #

Shortcode What it does Free/Pro
[alg_wc_wl] Displays the wishlist table. This is the shortcode you place on your dedicated wishlist page. Free
[alg_wc_wl_counter] Outputs the number of items in the current visitor’s wishlist. Free
[alg_wc_wl_remove_all_btn] Shows a button that removes every item from the wishlist in one click. Free
[alg_wc_wl_icon] Displays a wishlist icon with an item counter, optionally linking to the wishlist page. Pro
[alg_wc_wl_toggle_item_btn] Adds an “add to / remove from wishlist” button for a product anywhere on your site. Pro
[alg_wc_wl_item_users_amount] Outputs how many users have added a given product to their wishlist. Pro

Parameters #

[alg_wc_wl_counter] #

  • ignore_excluded_items: set to true to leave excluded items out of the count. Default false.
  • template: HTML template used to render the counter. Default <span class="alg-wc-wl-counter">{content}</span>.
  • amount: force a specific number instead of counting the live wishlist.

[alg_wc_wl_icon] #

  • counter: show the item count next to the icon. Default true.
  • link: make the icon link to the wishlist page. Default true.
  • use_thumb_btn_style: reuse the thumb button icon and styling. Default true.
  • ignore_excluded_items: leave excluded items out of the count. Default false.

Example:

[alg_wc_wl_icon counter="true" link="true" ignore_excluded_items="true"]

[alg_wc_wl_remove_all_btn] #

  • tag: HTML tag used for the button. Default button.
  • remove_label: button text. Default Remove all.
  • auto_hide: hide the button after it is clicked. Default false.
  • show_loading: show a loading icon after clicking. Default false.

[alg_wc_wl_toggle_item_btn] #

  • product_id: the product the button targets. If empty, the current product in the loop is used.
  • btn_type: default_btn or thumb_btn. Default default_btn.

Example:

[alg_wc_wl_toggle_item_btn product_id="123" btn_type="thumb_btn"]

Deprecated shortcodes #

Two older shortcodes still work but are deprecated. Use [alg_wc_wl_toggle_item_btn] instead:

  • [alg_wc_wl_toggle_item]
  • [alg_wc_wl_add_to_cart] (deprecated since version 1.8.5)

Note: if a shortcode prints its own name back on the page as plain text (for example [alg_wc_wl_counter]), that shortcode has been switched off under the Shortcodes tab. Enable it there and save.

Get more from your wishlist #

The icon, toggle button, and product popularity shortcodes are part of Wishlist for WooCommerce Pro. If you are still on the free version, upgrading unlocks them along with the rest of the Pro toolkit. See what Pro unlocks.

 

Wishlist for WooCommerce