Archives: Snippets
sion
WP Simple Pay: Facebook Payment Conversion Tracking
/** * @link https://library.wpcode.com/snippet/j57gg315/ */ add_action( ‘simpay_payment_receipt_viewed’, /** * Runs the first time the payment confirmation page is viewed. * * @param array $payment_confirmation_data */ function( $payment_confirmation_data ) { // Payment customer data (not used in this example). $customer =…Continue reading
WP Simple Pay: Add User Meta After Payment
/** * @link https://library.wpcode.com/snippet/qo9xxmjo/ * * @param \Stripe\Event $event Stripe Event. * @param \Stripe\Subscription|\Stripe\PaymentIntent $object Stripe Subscription or PaymentIntent */ function simpay_update_wp_user( $event, $object ) { $email_address = $object->customer->email; $wp_user = get_user_by( ’email’, $email_address ); // User cannot be found,…Continue reading
google search console
Set Header Menu as “Custom”
add_filter( ‘totaltheme/header/menu/is_custom’, ‘__return_true’ );Continue reading
Add Rel Nofollow to Top Bar Social Links
add_filter( ‘totaltheme/topbar/social/link_attributes’, function( $attrs ) { $attrs[‘rel’] = ‘nofollow’; return $attrs; } );Continue reading
Override Header Logo with Custom SVG
add_filter( ‘totaltheme/header/logo’, function( $output ) { return ‘‘; } );Continue reading
Allow Templatera Templates to be used for Dynamic Templates
add_filter( ‘totaltheme/theme-builder/template_post_types’, function( array $types ): array { $types[‘templatera’] = ‘Templatera’; return $types; } );Continue reading
Remove the Page Title from the Page Header
add_filter( ‘totaltheme/page/header/has_title’, ‘__return_false’ );Continue reading