This file contains hidden or 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 | |
/** | |
* Hide widgets by widget instance ID for protected members only content. | |
* Update the $hide_widget_instances_array with the array of widget instance IDs you want to filter. | |
* Update the pmpro_hasMembershipLevel check for your membership level IDs. | |
* | |
* Add this code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_widgets_by_membership_level( $instance, $widget, $args ) { |
This file contains hidden or 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 the pmpro_account shortcode on the WooCommmerce My Account page for members | |
* who have a history of membership through Paid Memberships Pro. | |
*/ | |
function pmpro_do_membership_account_shortcode() { | |
global $wpdb, $current_user; | |
if( is_user_logged_in() && defined( 'PMPRO_VERSION' ) ) { ?> | |
<style> .pmpro_actionlinks {display: none; } </style> | |
<?php |
This file contains hidden or 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
<style> | |
#primary form.bp-dir-search-form { | |
display: grid; | |
grid-template-columns: 4fr 1fr; | |
grid-template-areas: "input button"; | |
} | |
#primary form.bp-dir-search-form input[type="search"]#dir-members-search { | |
border: none; | |
border-radius: 0px; | |
grid-area: input; |
This file contains hidden or 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 | |
/** | |
* Apply the WordPress the_content filter to the level description and confirmation message | |
* so that you can add shortcodes or other content in this area. | |
* | |
* 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 hidden or 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 // Do not copy this tag | |
/** | |
* Filter the Google Font weights loaded in Memberlite (as of version 4.0.1). | |
* | |
* Add this code below to a plugin for theme customizations. | |
*/ | |
function my_memberlite_google_fonts_weights( $font_weights ) { | |
$font_weights = '300,400,700,900'; | |
return $font_weights; | |
} |
This file contains hidden or 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 new "Membership Level" Custom Dimension to your Google Analytics tracking code. | |
* | |
* Requires Paid Memberships Pro, MonsterInsights Pro and the MonsterInsights - Dimensions Addon. | |
*/ | |
/** | |
* Filter for adding the new dimension as under Insights > Settings > Dimensions | |
*/ |
This file contains hidden or 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 // Do not copy this tag | |
/* | |
* Make specific post IDs in a restricted category available publicly. | |
* | |
* Add this code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function unlock_posts_by_ID( $hasaccess, $post, $user, $post_membership_levels ) { | |
// If they already have access, let them at it. | |
if ( $hasaccess ) { | |
return $hasaccess; |
This file contains hidden or 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 Register Helper fields for donteatthat thread on price-adjusting fields. | |
*/ | |
function donteatthat_pmprorh_init() { | |
// Don't break if Register Helper is not loaded. | |
if ( ! function_exists( 'pmprorh_add_registration_field' ) ) { | |
return false; | |
} |
This file contains hidden or 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 is demo content for the Sitewide Sale Add On for Paid Memberships Pro. | |
* You can view a live preview of this content in the "Neon" Sale Template here: | |
* https://demo.memberlitetheme.com/membership/sitewide-sales/sample-sale-2/ | |
*/ | |
?> | |
<div class="text-center"> | |
<h1>Join the ACME Podcast</h1> | |
<h2>Black Friday</h2> |
This file contains hidden or 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 is demo content for the Sitewide Sale Add On for Paid Memberships Pro. | |
* You can view a live preview of this content in the "Gradient" Sale Template here: | |
* https://demo.memberlitetheme.com/membership/sitewide-sales/sample-sale-1/ | |
* | |
* Remove this comment and place the content below into the "Sale Content" field of your Sitewide Sale. | |
*/ | |
?> | |
[fa icon="piggy-bank"] |