Shortcode Usage
The WooCommerce Products Wishlist plugin provides three powerful shortcodes that allow you to display wishlist functionality anywhere on your website, giving you complete control over placement and presentation.
Available Shortcodes
๐ Wishlist Table
Purpose: Displays the complete wishlist in a table format
Best for: Dedicated wishlist pages, customer account areas
Features: Full product management with add to cart, remove, and quantity selection
๐ฏ Single Product Wishlist Button
Purpose: Shows wishlist button/link for the current product (single product pages)
Best for: Custom product page layouts, additional wishlist placements
Features: Add/remove functionality with visual state changes
๐ Archive Product Wishlist
Purpose: Displays wishlist functionality for products in archive/loop contexts
Best for: Custom shop layouts, product grids, featured product sections
Features: Context-aware product detection in WooCommerce loops
Primary Shortcode: [woowish_table]
๐ Page Creation
To create a custom wishlist page:
- Create a new page in WordPress
- Add the shortcode
[woowish_table]to the page content - Publish the page
- Update the โWishlist page URLโ setting with the new pageโs URL
Where to Use Shortcodes
๐ Pages and Posts
Add any shortcode directly to page or post content:
[woowish_table]
Best for: Dedicated wishlist pages, customer service pages, account pages
๐๏ธ Widgets
Use shortcodes in text widgets or custom HTML widgets:
[woowish_single]
Best for: Sidebars, footer areas, header widgets
๐ Page Builders
Most page builders support shortcodes:
- Elementor: Use Shortcode widget
- Beaver Builder: Use HTML module
- Divi: Use Code module
- Gutenberg: Use Shortcode block
- Visual Composer: Use Raw HTML element
๐จ Theme Templates
Add to theme files using PHP:
<?php echo do_shortcode(โ[woowish_table]โ); ?>
Best for: Custom theme development, specific template modifications
Shortcode Behavior and Context
๐ User Detection
- Logged-in Users: Shows full functionality with database storage
- Guest Users: Shows functionality with cookie-based storage
- Disabled Users: Respects General settings for user type restrictions
๐ Product Context
- [woowish_single]: Automatically detects current product on single product pages
- [woowish_archive]: Works within WooCommerce product loops
- [woowish_table]: Shows all saved products regardless of current page context
Common Use Cases
๐ช Custom Shop Layout
Use [woowish_archive] in custom product grids or featured product sections to add wishlist functionality to any product display.
๐ค Customer Dashboard
Create a comprehensive customer dashboard page that includes [woowish_table] alongside other customer information and tools.
๐ง Email Campaign Landing
Create dedicated landing pages for email campaigns encouraging wishlist usage with [woowish_table] for registered users.
๐ฏ Additional Product Placements
Use [woowish_single] to add extra wishlist buttons in custom locations on product pages, such as in product galleries or description areas.
Styling and Customization
๐จ Custom Styling
Target shortcode output with CSS:
.woowish_table { /* Styles for table shortcode */ }
.woowish_btn { /* Styles for button shortcodes */ }
.woowish_link { /* Styles for link shortcodes */ }
Troubleshooting Shortcodes
Shortcode displays as text:
- Ensure youโre using the exact shortcode format:
[woowish_table] - Check that the plugin is activated
- Verify no syntax errors in the shortcode
Nothing displays:
- Check General settings โ ensure the user type (member/guest) is enabled
- Verify WooCommerce is active and working
- For single/archive shortcodes, ensure youโre on appropriate pages
Styling issues:
- Check Style settings for color and display type configurations
- Verify custom CSS isnโt conflicting
- Test with a default theme to isolate theme-specific issues
Advanced Implementation
๐ง Conditional Display
Use WordPress conditional tags with shortcodes:
<?php if (is_user_logged_in()) { echo do_shortcode(โ[woowish_table]โ); } ?>
๐๏ธ Dynamic Content
Combine with other dynamic content for rich customer experiences:
<h2>Your Saved Products</h2>
[woowish_table]
<h2>Recommended for You</h2>