Skip to content

Instantly share code, notes, and snippets.

View dwanjuki's full-sized avatar

David dwanjuki

  • Nairobi, Kenya
  • 17:27 (UTC +03:00)
View GitHub Profile
@dwanjuki
dwanjuki / my_pmpro_members_list_csv_display_name_column.php
Created July 5, 2024 13:20
Add the user's Display Name to the Members List CSV export
<?php
/**
* Add the user's Display Name to the Members List CSV
*
* 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/
*/
@dwanjuki
dwanjuki / my_pmpro_buddypress_profile_template_redirect.php
Last active July 4, 2024 08:19 — forked from kimwhite/my_pmpro_buddypress_profile_template_redirect.php
Redirect the PMPro Profile Edit and Password Reset pages to the user's BuddyPress Profile and Settings pages respectively
<?php
/**
* Redirect the PMPro Profile Edit and Password Reset pages
* to the user's BuddyPress Profile and Settings pages
*
* 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/
*/
@dwanjuki
dwanjuki / my_pmpro_buddyboss_profile_account_shortcode.php
Created July 3, 2024 12:09
Remove PMPro "profile" section from the BuddyPress profile page Membership tab
<?php // copy from below
/**
* Customize sections displayed on the Membership tab of the BuddyPress profile page
*
* Remove "Profile" section
*
* 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/
@dwanjuki
dwanjuki / my_flrt_query_remove_pmproup_filter.php
Created June 27, 2024 12:06
Makes "Filter Everything" frontend filters work for non-admins too if PMPro User Pages is active
<?php // copy from below
/**
* Remove PMPro User Pages query filter if the query is a Filter Everything query
*
* 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/
*
*/
@dwanjuki
dwanjuki / my_pmpro_bp_directory_redirect.php
Last active June 26, 2024 14:22
Restrict access to the BuddyPress directory based on membership level (Redirect away)
<?php
/**
* Restrict access to the BuddyPress directory based on membership level
*
* 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/
*/
@dwanjuki
dwanjuki / pmpro-add-welcome-name-to-menu.php
Last active June 24, 2024 12:17 — forked from kimwhite/pmpro-add-welcome-name-to-menu.php
Add member's name to Top Bar Nav menu location (OceanWP theme)
<?php
/**
* Add "Welcome, User Display Name" to the OceanWP Top Bar menu location
*
* 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/
*/
@dwanjuki
dwanjuki / my_pmpro_pbc_order_added_admin_email.php
Created June 21, 2024 09:27
Send admin an email notification on Pay By Check pending order creation
<?php
/**
* Send admin an email notification on Pay By Check pending order creation
*
* 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/
*/
@dwanjuki
dwanjuki / remove-sub-delay-pmpro.php
Last active June 18, 2024 06:51 — forked from andrewlimaza/remove-sub-delay-pmpro.php
Remove Subscription Delay for members and past members and set the initial price to the billing amount.
<?php
/**
* Remove the Subscription Delay for members and past members
*
* This will change the price of the initial amount to the billing amount
* for past members of the level being checked out for
*
* This is an advanced customization recipe that may require further development
* to suit specific needs and/or setups. For more details, please see:
* https://www.paidmembershipspro.com/developers/
@dwanjuki
dwanjuki / my_pmpro_show_affiliate_code_shortcode.php
Created June 12, 2024 14:54
Add a shortcode to show the currently active PMPro affiliate code
<?php
/**
* Add a shortcode to show the currently active PMPro affiliate code
*
* Use shortcode: [show_affiliate_code]
*
* 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/
@dwanjuki
dwanjuki / my_pmpro_members_list_csv_approval_column.php
Created June 11, 2024 12:28
Include approval status in the Members List export CSV
<?php // copy from below
/**
* Include membership approval status in the Members List export CSV
*
* 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/
*/
function my_pmpro_members_list_csv_approval_column( $columns ) {