In a previous article, we demonstrated the five default templates included in the Sitewide Sales Add On for Paid Memberships Pro. This post shows you how to insert a custom template name you can then target via your child theme’s style.css or a plugin for Memberlite Customizations.

The recipe leverages the pmpro_sws_landing_page_templates filter hook in the Sitewide Sales Add On for Paid Memberships Pro.

The Code Recipe

Adding the recipe to your website

Copy and paste this code recipe into a helper Memberlite Customizations plugin.

Styling your Custom Template.

Once you have inserted the new template name, you’ll need to edit or create a new Sitewide Sale and set the “Landing Page Template” and “Banner Template” (if desired) to your new value.

The selection will allow you to target the sale via the following CSS selectors (replace templatename with your template’s key name):

/* Added to the  tag */
body.pmpro-sitewide-sale-landing-page-templatename { }

/* Wraps the entire output of the [pmpro_sws] shortcode */
#pmpro_sitewide_sale_landing_page_template-templatename { } 

/* Wraps the entire display of the banner (if selected) */
.pmpro_sws_banner_template-templatename { }

We’ll be adding default templates over time, so if you have a favorite landing page design share a link to the page in the comments below.