Shortcodes
Wishlist Table
Section titled “Wishlist Table”Syntax
Section titled “Syntax”[wishlist]Attributes
Section titled “Attributes”| Attribute | Type | Default | Description |
|---|---|---|---|
per_page | int | 10 | Items per page (1-20) |
Examples
Section titled “Examples”[wishlist][wishlist per_page="15"][wishlist per_page="20"]Display
Section titled “Display”Shows:
- Product image
- Product name
- Variation attributes (if applicable)
- Price (if enabled)
- Stock status (if enabled)
- Add to Cart button (if enabled)
- Remove button (if enabled)
- Pagination (if needed)
Add to Wishlist Button
Section titled “Add to Wishlist Button”Syntax
Section titled “Syntax”[add_to_wishlist product_id="123"]Attributes
Section titled “Attributes”| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
product_id | int | Yes | - | WooCommerce product ID |
variation_id | int | No | 0 | Variation ID for variable products |
type | string | No | button | Display type: button or icon |
Examples
Section titled “Examples”Simple product:
[add_to_wishlist product_id="123"]Variable product:
[add_to_wishlist product_id="123" variation_id="456"]Icon display:
[add_to_wishlist product_id="123" type="icon"]Placement
Section titled “Placement”Pages/Posts
Section titled “Pages/Posts”Block Editor:
- Add “Shortcode” block
- Enter shortcode
Classic Editor:
- Paste shortcode in content
Widgets
Section titled “Widgets”- Add “Shortcode” widget
- Enter shortcode
PHP Templates
Section titled “PHP Templates”<?php echo do_shortcode('[wishlist]'); ?><?php$product_id = get_the_ID();echo do_shortcode("[add_to_wishlist product_id=\"{$product_id}\"]");?>CSS Classes
Section titled “CSS Classes”| Class | Element |
|---|---|
.webtriad-awl-wishlist | Main container |
.webtriad-awl-wishlist-table | Table element |
.webtriad-awl-wishlist-item | Table row |
.webtriad-awl-product-name | Product name cell |
.webtriad-awl-product-price | Price cell |
.webtriad-awl-stock-status | Stock status cell |
.webtriad-awl-actions | Actions cell |
.webtriad-awl-button | Button element |
.webtriad-awl-button--added | Button when product in wishlist |
.webtriad-awl-icon | Icon element |