[wlfmc_add_to_wishlist]
Shortcode “[wlfmc_add_to_wishlist]
” loads the content of the “add-to-wishlist.php” template (the file is in the “templates” folder of the plugin), and prints the “Add To Wishlist” button in the front end.
Shortcode Attributes:
♦ Product ID
product_id (int)
Ability to Add a wishlist shortcode for places where there is no product page and no lists like sliders, images, boxes, and galleries with :
[wlfmc_add_to_wishlist product_id="Your_product_id"]
♦ Single Product
is_single (string)
If you want to use the Single Product Options & Style, set this value to true (Otherwise, it uses the Products List Style).
Attributes:
- true : Uses single product style
- false : Uses Products list style
sample:
[wlfmc_add_to_wishlist is_single="false"]
♦ Button Type
button_type (string)
Choose from the three types of buttons below:
Attributes:
- text: text only
- icon: icon only
- both: Icon and text
sample:
[wlfmc_add_to_wishlist button_type="both"]
♦ Separate Icon and Text
separate_icon_and_text (string)
Separate icon and text boxes with a vertical line.
Attributes:
- true: Enables the icon and text separation
- false : Disables icon and text separation
sample:
[wlfmc_add_to_wishlist separate_icon_and_text="false"]
♦ Added to Wishlist Popup
enable_popup (string)
Show popup after added to wishlist. A pop-up will open to set custom buttons/buttons to guide the user.
Attributes:
- true: Enables the Popup
- false : Disables the Popup
sample:
[wlfmc_add_to_wishlist enable_popup="true"]
♦ Icon
icon (string)
You can choose your button icon in 6 options:
Attributes:
- heart
- tag
- plus
- gift
- star
- pin
sample:
[wlfmc_add_to_wishlist icon="heart"]
♦ Added Icon
added_icon (string)
You can choose your added button icon in 6 options:
Attributes:
- heart-o
- tag-o
- plus-o
- gift-o
- star-o
- pin-o
sample:
[wlfmc_add_to_wishlist added_icon="pin-o"]
♦ Icon Prefix Class
icon_prefix_class (string) (default= “wlfmc-icon-”)
If you want to choose another icon font for your wishlist icon, you can change the icon prefix.
To use other fonts, you should add your theme’s style file and font files to your theme. These shortcodes only replace classes, not the fonts themselves.
use font awesome for icon sample:
[wlfmc_add_to_wishlist icon_prefix_class="fas fa-"]
clear prefix and use prefix in icon and added_icon sample:
[wlfmc_add_to_wishlist icon_prefix_class=" " icon="fas fa-heart" added_icon="fas fa-heart-o"]
♦ Default Button Style
button_theme (string)
Enable if use theme default styles for icon and text
Attributes:
- true: Uses default theme button style.
- false : Uses customized button style.
sample:
[wlfmc_add_to_wishlist button_theme="true"]
♦ Button Tooltip
enable_tooltip (string)
By enabling this feature, a tooltip box will appear when you hover on “Add to Wishlist” button.
You can also customize this tooltip style.
Attributes:
- true: Enables button tooltip
- false : Disables button tooltip
sample:
[wlfmc_add_to_wishlist enable_tooltip="true"]
♦ Tooltip Directions
tooltip_direction (string)
You can set the tooltip positioning using this option.
Attributes:
- top
- right
- bottom
- left
sample:
[wlfmc_add_to_wishlist tooltip_direction="top"]
♦ “Add to Wishlist” Text
button_label_add (string)
You can change the text shown as “Add to Wishlist” to anything you desire.
sample:
[wlfmc_add_to_wishlist button_label_add="Add to List"]
♦ “View My Wishlist” Text
button_label_view (string)
Here you can change the “view my wishlist” text to your custom text.
sample:
[wlfmc_add_to_wishlist button_label_view="View my list"]
♦ “Remove from Wishlist” Text
button_label_remove (string)
You can also change the “Remove from wishlist” text.
sample:
[wlfmc_add_to_wishlist button_label_remove="Remove from list"]
♦ “Already in Wishlist” Text
button_label_exists (string)
If the product already exists in the user’s wishlist and clicks the Add to wishlist button again, this text will be displayed. You can leave this box empty if you don’t want a notification box.
sample:
[wlfmc_add_to_wishlist button_label_exists="exists in list"]
♦ “Add to Wishlist” Tooltip
tooltip_label_add (string)
You can change the default tooltip text shown as “Add to Wishlist” to anything you desire.
sample:
[wlfmc_add_to_wishlist tooltip_label_add="Add to list"]
♦ “View My Wishlist” Tooltip Text
tooltip_label_view (string)
Here you can change the default tooltip text “view my wishlist” to your custom text.
sample:
[wlfmc_add_to_wishlist tooltip_label_view="View my list"]
♦ “Remove from Wishlist” Tooltip Text
tooltip_label_remove (string)
You can also change the “Remove from wishlist” tooltip text.
sample:
[wlfmc_add_to_wishlist tooltip_label_remove="Remove from list"]
♦ “Already in Wishlist” Tooltip Text
tooltip_label_exists
Using this, you can change the “Already in wishlist” tooltip text.
sample:
[wlfmc_add_to_wishlist tooltip_label_exists="exists in list"]