Move WooCommerce Category Description Below Products

add_action( ‘init’, function() { // Disable subheading on product cats add_filter( ‘totaltheme/page/header/has_subheading’, function( $check ) { if ( is_tax( ‘product_cat’ ) ) { $check = false; } return $check; } ); // Display description below loop add_action( ‘wpex_hook_content_bottom’, function( $bool…Continue reading

MemberPress: Remove all but nine countries from the drop-down

function mepr_remove_countries( $countries, $prioritize_my_country ) { return array( ‘AU’ => _x( ‘Australia’, ‘ui’, ‘memberpress’ ), ‘CA’ => _x( ‘Canada’, ‘ui’, ‘memberpress’ ), ‘DK’ => _x( ‘Denmark’, ‘ui’, ‘memberpress’ ), ‘FR’ => _x( ‘France’, ‘ui’, ‘memberpress’ ), ‘DE’ => _x( ‘Germany’,…Continue reading

MemberPress: Add Author Custom Bio Shortcode

function mpcs_author_custom_bio_shortcode( $atts ) { if( !isset( $atts[‘slug’] ) || empty( $atts[‘slug’] ) ) { return; } global $post; $field = get_user_meta( $post->post_author, $atts[‘slug’], true ); if( empty( $field ) ) { return; } return ‘ ‘ . sanitize_text_field( $field…Continue reading

MemberPress: Dynamic Trail Periods

function mepr_days_until( $date ){ return ( isset( $date ) ) ? floor( ( strtotime( $date ) – time() )/60/60/24 ) : false; } function mepr_update_mepr_trial_period() { $prd = new MeprProduct( 4480 ); //CHANGE 123 to the ID of your Membership…Continue reading

MemberPress: MailChimp Feed Unblocker

function mepr_allow_mc_through( $block, $post, $uri ) { if( isset( $_GET[ ‘allow_mailchimp’ ] ) ) { $block = false; } return $block; } add_filter( ‘mepr-pre-run-rule-content’, ‘mepr_allow_mc_through’, 11, 3 );Continue reading