Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adds a "Black Friday" template name to the array of available templates for Sitewide Sales Add On for Paid Memberships Pro.
<?php
/*
* Filters the array of available templates for Sitewide Sales Add On for Paid Memberships Pro.
*
* @param array $templates The default list of available templates.
*/
function add_custom_pmpro_sws_landing_page_templates( $templates ) {
$templates['black-friday'] = 'Black Friday'; // This is how you add a new template to the array.
//unset( $templates['neon'] ); // This is how you unset an included template from the array.
return $templates;
}
add_filter( 'pmpro_sws_landing_page_templates', 'add_custom_pmpro_sws_landing_page_templates' );
add_filter( 'pmpro_sws_banner_templates', 'add_custom_pmpro_sws_landing_page_templates' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment