Skip to content

Instantly share code, notes, and snippets.

@kimcoleman
Last active November 17, 2020 23:18
Show Gist options
  • Save kimcoleman/1142ab408f7ad227b92e05f181399209 to your computer and use it in GitHub Desktop.
Save kimcoleman/1142ab408f7ad227b92e05f181399209 to your computer and use it in GitHub Desktop.
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' );
@kimcoleman
Copy link
Author

This gist is not compatible with the Sitewide Sales plugin and will need to be updated to work with that plugin. You can use a modified version of this recipe instead: https://gist.github.com/kimcoleman/e8c38f1dd658eef0b4bb60654102d6a0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment