Skip to content

Instantly share code, notes, and snippets.

View kimcoleman's full-sized avatar

Kim Coleman kimcoleman

View GitHub Profile
@kimcoleman
kimcoleman / Paid-Memberships-Pro-Neon-Sitewide-Sale.html
Last active September 24, 2020 11:51
Sample content for Sitewide Sales: Neon Template for Paid Memberships Pro
/**
* Sale Type: Paid Memberships Pro
* Sale Template: Neon
*/
// Pre-Sale Content:
<h4>Get ready for the most lit-up sale ever.</h4>
<h1>The Illuminated Sale Coming Soon!</h1>
<p><a href="#">Learn More</a></p>
@kimcoleman
kimcoleman / Paid-Memberships-Pro-Gradient-Sitewide-Sale.html
Last active September 24, 2020 11:52
Sample content for Sitewide Sales: Gradient Template for Paid Memberships Pro
/**
* Sale Type: Paid Memberships Pro
* Sale Template: Gradient
*/
// Pre-Sale Content:
<h1>The Smooth Sale is Almost Here!</h1>
<h4>The wait is almost over. Sale starting October 5014!</h4>
<p><a href="#">Learn More</a></p>
@kimcoleman
kimcoleman / Paid-Memberships-Pro-Fancy-Coupon-Sitewide-Sale.html
Last active September 24, 2020 11:52
Sample content for Sitewide Sales: Fancy Coupon Template for Paid Memberships Pro
/**
* Sale Type: Paid Memberships Pro
* Sale Template: Fancy Coupon
*/
// Pre-Sale Content:
<h1>Sale Coming Soon!</h1>
<h4>Get ready for the best sale ever. Coming January 2230!</h4>
<p><a href="#">Learn More</a></p>
@kimcoleman
kimcoleman / custom_dimensions_membership_level.php
Created September 14, 2020 18:28
Custom Dimensions for Membership Level with the plugin GA Google Analytics by Jeff Starr
<?php
/**
* Custom Dimensions for Membership Level with the plugin GA Google Analytics by Jeff Starr
* https://wordpress.org/plugins/ga-google-analytics/
*
* You must create the custom dimension for Membership Level in your Google Analytics account
* and properly update that line in this recipe for the ID of your dimension.
*
*/
function custom_dimensions_membership_level( $custom_code ) {
@kimcoleman
kimcoleman / custom_dimensions_for_ga_google_analytics.php
Created September 14, 2020 18:24
Custom Dimensions for Google Analytics using the plugin GA Google Analytics by Jeff Starr and Paid Memberships Pro
<?php
/**
* Custom Dimensions for Google Analytics.
* For the plugin GA Google Analytics for Jeff Starr
* https://wordpress.org/plugins/ga-google-analytics/
*
* You must create the four custom dimensions in Analytics and map them exactly as follows:
** post_type = dimension1
** post_author = dimension2
** post_category = dimension3
@kimcoleman
kimcoleman / add_billing_shipping_fields_to_profile_and_add_member.php
Created September 8, 2020 19:03
Adds Billing Address and Shipping Address (via the Shipping Add On) to the Edit User profile, frontend Member Profile Edit, and the Add Member Admin page.
<?php
/*
* Adds Billing Address and Shipping Address (via the Shipping Add On) to the Edit User profile,
* frontend Member Profile Edit, and the 'Add Member' page in the WordPress admin.
*
* 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/
*
@kimcoleman
kimcoleman / w3_total_cache_no_cache.html
Last active June 11, 2024 17:47
Add these pages/directories to the "Never cache the following pages:" setting in W3 Total Cache
/membership-account*
/membership-checkout*
/membership-levels*
/login/
@kimcoleman
kimcoleman / pmpro_member_homepage_id.php
Created August 13, 2020 21:08
Redirect members of level ID 1 to the post_id '232' on login.
<?php
/**
* Redirect members of level ID 1 to the CPT with ID '232' on login.
*
* 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/
*
*/
<?php
/**
* Set the member homepage for members of Level 3 to the post ID 232.
*
* 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/
*
*/
@kimcoleman
kimcoleman / add_nickname_pmprorh_user_table_fields.php
Created August 11, 2020 14:58
Add nickname to the Member Profile Edit frontend page.
<?php
/**
* Add nickname to the Member Profile Edit frontend page.
*
* 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/
*
*/