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 | |
/** | |
* Ensure Paid Memberships Pro compatibility when using Page Builder by SiteOrigin: | |
* https://wordpress.org/plugins/siteorigin-panels/ | |
* | |
* Your administrator-level account must have a Membership Level in order to edit all of the pages assigned | |
* under Memberships > Pages. | |
* | |
* You must also set a Custom Field on the Membership Checkout page with the key 'pmpro_default_level' and | |
* value of a level ID in order to properly edit your Membership Checkout page using the builder. |
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 | |
/* | |
* Register BuddyPress member types to be assigned based on Membership Level when using the | |
* BuddyPress Add On for Paid Memberships Pro (https://www.paidmembershipspro.com/add-ons/buddypress-integration/). | |
* | |
* If you are using BuddyPress v2.3+ and would like to use the Member Specific Directory option, | |
* update this function to use the bp_register_member_types hook. | |
* See: https://codex.buddypress.org/developer/member-types/ | |
*/ | |
function my_pmpro_bbg_register_member_types() { |
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 tab to your BuddyPress Profile page to show a user's Membership Account information. | |
* | |
*/ | |
function pmpro_membership_buddypress_tab() { | |
global $bp; | |
if ( function_exists( 'pmpro_hasMembershipLevel' ) && pmpro_hasMembershipLevel() ) { | |
bp_core_new_nav_item( array( |
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 | |
/** | |
* Redirect the Membership Account page to the user's BuddyPress Profile. | |
* | |
*/ | |
function my_pmpro_buddypress_profile_template_redirect() { | |
global $pmpro_pages; | |
// Make sure PMPro is active. | |
if ( empty( $pmpro_pages ) ) { |
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 member's name and avatar to the masthead on the membership account page using the Memberlite theme. | |
*/ | |
function my_membership_account_memberlite_after_masthead_inner( ) { | |
global $pmpro_pages, $current_user; | |
if ( ! empty( $pmpro_pages ) && is_page( $pmpro_pages['account'] ) ) { | |
echo '<div class="text-center">' . get_avatar( $current_user->ID, 128 ) . '</div>'; | |
echo '<h1 class="text-center">Welcome, ' . $current_user->display_name . '</h1>'; | |
} |
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
[row] | |
[col large="8" large_offset="2"] | |
[testimonials char_limit=0 limit=-1 orderby="date"] | |
[/col] | |
[/row] |