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 | |
/** | |
* Add a Requires Membership Column to All Post view | |
* This is an easy way to see how your content is being restricted for members. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ |
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 | |
/** | |
* Add a Requires Membership Column to All Page and Post Views. | |
* This is an easy way to see how your content is being restricted for members. | |
*/ | |
// Add a new column to the all pages and posts views | |
function requires_membership_columns_head( $defaults ) { | |
$defaults['requires_membership'] = 'Requires Membership'; | |
return $defaults; |
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 | |
/** | |
* Show a “Requires Membership” Column on the Categories Screen | |
* This is an easy way to see how your content is being restricted for members. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ |
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 | |
/* | |
Custom profile template for the PMPro Member Directory Add On version .6.1 | |
Add "Edit Profile" link at the bottom of the member information - remove | |
if a member is viewing thier own profile. | |
Note: Custom templates may require review and updates with every plugin version update. | |
updated for Version 0.7 May 2020 | |
To use this custom template, | |
create the following folders in your active theme directory: | |
{your-theme}/paid-memberships-pro/pmpro-member-directory/ |
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 | |
/** | |
* Custom membership-card template: Set recurring membership renewal date as expiration date. | |
* Updated April 17, 2020 to include the qr code | |
* Place this directly in your theme/child-theme's root directory | |
* e.g.: example.com/wp-content/themes/{your active theme}/membership-card.php | |
*/ | |
global $wpdb, $pmpro_membership_card_user, $pmpro_currency_symbol, $post; | |
if( (in_array('small',$print_sizes)) || (in_array('Small',$print_sizes)) || (in_array('all',$print_sizes)) || empty($print_sizes) ) | |
$print_small = true; |
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 | |
/** | |
* Make sure address fields are required | |
*/ | |
function my_pmpro_required_billing_fields( $fields ) { | |
global $bfirstname, $blastname, $baddress1, $bcity, $bstate, $bzipcode, $bcountry, $bphone, $bemail; | |
$fields[ 'bfirstname' ] = $bfirstname; | |
$fields[ 'blastname' ] = $blastname; | |
$fields[ 'baddress1' ] = $baddress1; | |
$fields[ 'bcity' ] = $bcity; |
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 | |
/** | |
* This recipe adds an additional Terms of Service Page for Register Helper | |
* applies formatting & shortcodes, uses post title for field label | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ |
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 | |
/** | |
* This recipe: Show a login/register link at the bottom of any post that uses the membership shortcode. | |
* | |
* Note this doesn't check for specific membership levels. | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ |
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 | |
/** | |
* Only sell to specific countries by adding in the 'allowed' countries' in | |
* the $restricted_countries array. | |
* change messages on line 35 and 51 for your site. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ |
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 | |
/** | |
* This recipe will Add Custom Templates to your "Email Templates" area, so you can edit them. | |
* 2nd fuction will send them off depending on Level. | |
* You will have to create these email templates using this method: | |
* https://www.paidmembershipspro.com/documentation/member-communications/customizing-email-templates/ | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. |
OlderNewer