Last active
November 17, 2020 23:18
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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
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