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 totrueto leave excluded items out of the count. Defaultfalse.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. Defaulttrue.link: make the icon link to the wishlist page. Defaulttrue.use_thumb_btn_style: reuse the thumb button icon and styling. Defaulttrue.ignore_excluded_items: leave excluded items out of the count. Defaultfalse.
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. Defaultbutton.remove_label: button text. DefaultRemove all.auto_hide: hide the button after it is clicked. Defaultfalse.show_loading: show a loading icon after clicking. Defaultfalse.
[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_btnorthumb_btn. Defaultdefault_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.
