Knowledge Base
Pro Coupon Loop Shortcode and Filter Bar
- The Shortcode
- The Taxonomies
- Filters
- Management and Options
- Responsive Break Points
- Coupon Loop Inserter
The Shortcode
To use the new shortcode enter the following into your page content or any other content area that can use shortcodes:
[couponloop]
That will take all the default settings set in the Coupon Options, which you can learn about changing in the Management and Options section of this guide.
Each shortcode has options though you can use to override the defaults. You can manually create the shortcode using the options or the Coupon Inserter has all the new options built into it.
Coupons Per Page This controls how many coupons will be displayed per page with the following default options: -1 (all), 5, 10, 15, 20, 30, 40, 50.
[couponloop perpage="10"]
Columns Coupons are displayed in columns and changing this sets the default columns for the desktop view. The columns are responsive and will reduce in amount for mobile and tablet devices.
[couponloop columns="2"]
Orderby This sets what to order the coupons by with the following options: date, oldest, meta_value, modified. The Date is the default setting and meta_value will only show coupons with expiration dates and needs an extra field as explained below for Expiring Soon and Expiring Furthest.
[couponloop orderby="date"]
To use Expiring Soon and Expiring Furthest you need to use the following settings:
Expiring Soon
[couponloop orderby="meta_value" order="ASC" meta_key="cctor_expiration_mysql"]
Furthest Expiration
[couponloop orderby="meta_value" order="DESC" meta_key="cctor_expiration_mysql" ]
Order Change the order of the coupons either DESC or ASC.
[couponloop order="DESC"]
Taxonomies
Categories: This option enables you to select what categories of coupons to show. Create a list that is comma delimited of the coupon category slugs to use it.
[couponloop category="slug1,slug2,clothes"]
Category Match: Use this option to only show coupons that have ALL categories or ANY of the categories that are in the category option.
[couponloop match_category="ALL"]
Exclude Categories: This option enables you exclude categories of coupons from showing in the loop and in the filter bar list. Create a list that is comma delimited of the coupon category slugs to use it.
[couponloop exclude_category="slug1,slug2,food"]
Coupon Creator Add-ons Taxonomies:
Vendor and Location Taxonomies are included with Coupon Creator Add-ons
Vendors: This option enables you to select what vendors of coupons to show. Create a list that is comma delimited of the vendor slugs to use it.
[couponloop vendor="amazon,walmart,siteground"]
Vendor Match: Use this option to only show coupons that have ALL vendors or ANY of the vendors that are in the vendor option.
[couponloop match_vendor="ALL"]
Exclude Vendor: This option enables you exclude vendors of coupons from showing in the loop and in the filter bar list. Create a list that is comma delimited of the vendor slugs to use it.
[couponloop exclude_vendor="slug1,slug2,business"]
Locations: This option enables you to select what locations of coupons to show. Create a list that is comma delimited of the location slugs to use it.
[couponloop location="united-states,new-york,miami"]
Location Match: Use this option to only show coupons that have ALL locations or ANY of the locations that are in the location option.
[couponloop match_location="ALL"]
Exclude Location: This option enables you exclude locations of coupons from showing in the loop and in the filter bar list. Create a list that is comma delimited of the location slugs to use it.
[couponloop exclude_location="slug1,slug2,chicago"]
Filters
The filter bar is exclusive to the couponloop shortcode and enables a visitor on the front end to filter by category, category match, coupons per page, and order of the coupons. After the selection is made the visitors clicks submit to change the coupons or can click rest to go back to the shortcodes defaults.
Order Filters: Use this option to hide the filter bar.
[couponloop filter_order="category,orderby,perpage,vendor,location"]
Hide Filters: Use this option to hide a specific filter or the All or Any Selection for a taxonomy. Hidden fields will use the defaults set in the template tab or the shortcode, but will not be able to be changed by a visitor.
[couponloop filter_hide="orderby,match_cat"]
All Possible Filter Fields to Hide:
- category
- match_cat (hides any/all selection)
- orderby
- perpage
- vendor
- match_vendor (hides any/all selection)
- location
- match_location (hides any/all selection)
Hide Filter Bar: Use this option to hide the filter bar.
[couponloop filterbar="hide"]
Admin Management
With any new Coupon Creator feature there are also options to change how it works. The new Templating Tab in the option will manage these.
Main Coupon Loop Page: This option is to set the main coupon page. You can select an existing page or create a new one from this option. It will also warn you if you do not have the couponloop shortcode on the page and will enable you to add it to the existing page content.
Coupon Template: This template is used for the category views now setup by Pro, by default it uses your theme’s standard template. Change the options to use another that might work better for your site.
Coupons Per Page: Set the default perpage setting for the couponloop shortcode.
Coupon Loop Order: Set the default order for the couponloop shortcode.
Coupon Columns: Sets the amount of columns to show for the desktopview.
Responsive Break Points
The Filter bar has some options to change the breakpoints for the filter bar and columns under the Template Tab.
Filter Bar Break Point: This is set to 600px to change to the Mobile Filter View, change the value here fit it better to your theme.
Column Desktop Break Point and Column Mobile Break Point: These two values are option to change when the amount of columns change. The tablet media query is calculated using these two values.
Coupon loop Inserter
As there are many options with the Coupon Loop the Pro inserted is updated with all the Coupon Options and can be used to insert the shortcode into any page, post, or custom post content.