Archives: Snippets
Connect site to Google
google-site-verification: google476d5b0743fce814.htmlContinue reading
Connect site to Google
<meta name=”google-site-verification” content=”dROcFq5p2vjpkrcgXjTN7TwYZMWziiQtEZuubOGmbb8″ />Continue reading
Connect site to Google
Coonect site to Google
MemberPress: Add An Email Parameter That Displays A Link To The Sub-Account Signup Page
function mepr_subaccount_email_parameter( $params, $txn ) { global $wpdb; $user = $txn->user(); $caid = get_user_meta( $user->ID, ‘mpca_corporate_account_id’, true ); if(empty( $caid ) ) { $query = $wpdb->prepare( “SELECT uuid FROM {$wpdb->prefix}mepr_corporate_accounts WHERE user_id = %d”, (int)$user->ID ); $uuid = $wpdb->get_var( $query…Continue reading
Disable OpenGraph Tags on all Listing Detail Pages
add_filter( ‘aioseo_facebook_tags’, ‘aioseo_filter_remove_facebook_tags’ ); function aioseo_filter_remove_facebook_tags( $facebookMeta ) { $uri = parse_url( $_SERVER[‘REQUEST_URI’], PHP_URL_PATH ); if ( strpos( $uri, ‘/listing-detail/’ ) !== false ) { return array(); } return $facebookMeta; }Continue reading
Allow Tasty Pins Only On Single Posts
add_filter( ‘the_content’, function ( $content ) { // Return early if it is a single post. if ( is_singular( ‘post’ ) ) { return $content; } return str_replace( ‘Continue reading
MemberPress: Disable Emails for Specific Memberships
function mepr_disable_membership_emails( $recipients, $subject, $message, $headers ) { if( strpos( $message, ‘Free Membership’ ) !== false ) { return null; } return $recipients; } add_filter( ‘mepr-wp-mail-recipients’, ‘mepr_disable_membership_emails’, 10, 4 );Continue reading
MemberPress: Send Failed Transaction Notice When Admin Sets Transaction to Failed
function mepr_custom_failed_status_email( $txn ) { \MeprUtils::send_failed_txn_notices( $txn ); } add_action( ‘mepr-txn-status-failed’, ‘mepr_custom_failed_status_email’ );Continue reading