View Product Page

Shortcodes & Widgets

The plugin includes multiple shortcodes and widgets.

  1. Shortcode – Customer rankings
  2. Shorcode – Available points
  3. Shortcode – My points
  4. Shortcode – Product points
  5. Shortcode – Points for cart total
  6. Widget – Customers points
  7. Widget – Balance
  8. Backend widgets

1. Customer rankings

From the Ranking tab in YITH > Points & Rewards > Points options > Ranking, you can find the 2 styles of the customer ranking shortcode ready to copy and paste, but let’s see all the available options.

This shortcode allows you to print the ranking of your customers wherever you want on your website. The ranking lists top users of your store who have collected the most points.

This is the shortcode:

[ywpar_customers_points style="simple" tabs="yes" num_of_customers="3"]

Attributes available

style: this can either be simple or boxed.

Customers ranking simple style
Simple style
Customers ranking boxed style
Boxed style

tabs: this can either be yes or no.
If set to yes it will show the tabs All time, last 30 days, this week, today.
If set to no, it will show the list of users as All time with the number of points on the right.

Customers ranking with tabs
With tabs
Customers ranking without tabs
Without tabs

num_of_customers: here you can enter the number of customers to show in the rankings. It will automatically show only the ones with the most points.

The total number of points is calculated out of the total points they have earned in their history/week/month, regardless of how many points they have already redeemed (which would be instead their points balance).

So, for example, this week, Paul earns 1000 points, Mark 500 and Tony 300. Paul will be the first in the ranking, even if he has redeemed all his points to get a discount, while Mark and Tony still have not used them.

For the weekly ranking, the lists are updated every Monday.

2. Available points

[yith_ywpar_points]: shows remaining points to logged-in users;

shortcode balance

Paramaters are:

label: default value “Your credit is “
show_worth: default value “no”

E.g. [yith_ywpar_points label="Your credit is " show_worth="no"]

3. My points

[yith_ywpar_points_list]: shows the content of points as it appears in My Account, so points, levels, rank position recap tiles and the tabs with point history, target and get-point banners, and coupons.

4. Product points

[yith_points_product_message]: shows points that will be earned if you purchase the displayed product.

Points on product

You can either use it as is on a product page, and it will automatically show the points of that product, or use it on other pages and specify the product_id like this:

E.g. [yith_points_product_message product_id="488"]

5. Points for cart total

[yith_checkout_thresholds_message]: shows the number of assigned points based on the extra points rule for total in cart. Check here for more details about how to set up this extra points rule.

Points for cart total

Parameter:

title: default value “Checkout total thresholds”

E.g. [yith_checkout_thresholds_message title="Checkout total thresholds"]

6. Customers points

From the widget area in Appearance > Widgets, you can pick the Customers points widget.

Add widget
Customers points widget

You can configure:

  • title
  • style: simple or boxed
  • number of customers to show

7. Balance

Points balance widget

Youu can configure:

  • title
  • label: the text displayed before the number of points
Points balance frotnend

8. Backend widgets

In WordPress Dashboard you will be able to find two extra widgets, available only for the admin that show:

  1. Best point earners: the top users who have collected the most points
  2. Best rewards: the top users who have redeemed the most points
Backend widgets

By clicking on the View history button, you will open the user’s profile where you can edit the points and check the full points history.