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 | |
/** | |
* Only require First Name, Last Name and Email address to create user. | |
* This recipe requires Paid Memberships Pro and the Register Helper Add On. | |
*/ | |
/** | |
* Hide the Account Information Section | |
*/ | |
function simple_checkout_hide_account_information_section( $skip_account_fields, $current_user ) { |
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 members after login to 'dashboard' page slug or custom page as defined by ACF. | |
*/ | |
function coursecats_pmpro_login_redirect_url( $redirect_to, $request, $user ) { | |
// If logged in and a member, redirect them. | |
if ( ! empty( $user->ID ) && function_exists( 'pmpro_hasMembershipLevel' ) && pmpro_hasMembershipLevel( NULL, $user->ID ) ) { | |
$pmp_login_redirect_permalink = "dashboard"; |
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
/* Named colors are accessed from theme mods and selectors from "memberlite_defaults" global */ | |
$bgcolor_site_navigation_elements { | |
background: $bgcolor_site_navigation; | |
} | |
$color_site_navigation_elements { | |
color: $color_site_navigation; | |
} | |
$color_link_color_elements { |
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 some divs to create 2 columns for Billing Address and Payment Information Fields at membership checkout. | |
*/ | |
function pmpro_checkout_columns_divs_after_user_fields() { | |
echo '<div class="row"><div class="medium-6 columns">'; | |
} | |
add_action( 'pmpro_checkout_after_user_fields', 'pmpro_checkout_columns_divs_after_user_fields', 1 ); |
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 some divs to create 2 columns for Billing Address and Payment Information Fields at membership checkout. | |
*/ | |
function pmpro_checkout_columns_divs_after_user_fields() { | |
echo '<div class="grve-row"><div class="grve-column wpb_column grve-column-1-2">'; | |
} | |
add_action( 'pmpro_checkout_after_user_fields', 'pmpro_checkout_columns_divs_after_user_fields', 1 ); |
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 | |
/* | |
* Allow members to renew at a discounted rate if they have expired within 3 months. | |
* | |
*/ | |
/* | |
* Allow members to renew at a discounted rate if they have expired within 3 months. | |
* | |
*/ | |
function grace_period_discount_pmpro_checkout_level( $level ) { |
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 | |
/** | |
* Creates custom fields for admins to assign member "badge" icons. Display these icon badges on the Profile page. | |
* | |
* Include this custom CSS to display the icons on the member's frontend Profile page: | |
* https://gist.github.com/kimcoleman/83f8d089ae35fd9d4cc05cb11fd66e79 | |
* | |
*/ | |
function custom_member_badges_fields() { |
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
/* Custom CSS to pair with this recipe: https://gist.github.com/kimcoleman/391a537ffabf1d2f0c3027e988b291ea */ | |
<style> | |
.pmpro_member_directory_php_developer, | |
.pmpro_member_directory_javascript_developer, | |
.pmpro_member_directory_mysql_developer { | |
display: inline-block; | |
padding: 15px; | |
font-size: 0; | |
} | |
.pmpro_member_directory_php_developer strong:after, |
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
#Example SQL to add restriction on CPT 'gallery' for Level ID 3. Change CPT name and ID for your needs. | |
INSERT IGNORE INTO wp_pmpro_memberships_pages (membership_id, page_id) | |
SELECT '3', ID FROM wp_posts WHERE post_type = 'gallery'; |