Archives: Snippets
Untitled Snippet
RB2B script
Disable AIOSEO Schema markups for a specific page
add_filter( ‘aioseo_schema_disable’, ‘aioseo_disable_schema_for_specific_page’ ); function aioseo_disable_schema_for_specific_page( $disabled ) { if ( is_page( 1209 ) ) { return true; } return $disabled; }Continue reading
WP Simple Pay: Add Customer Shipping Address to Payment Metadata
/** * @link https://library.wpcode.com/snippet/m5ljwkl2/ */ add_filter( ‘simpay_get_paymentintent_args_from_payment_form_request’, function( $args, $form ) { $customer = \SimplePay\Core\API\Customers\retrieve( $args[‘customer’], $form->get_api_request_args() ); $shipping_address = $customer->shipping->address; $shipping_name = $customer->shipping->name; $shipping_phone = $customer->shipping->phone; $args[‘metadata’][‘Shipping-name’] = $shipping_name; $args[‘metadata’][‘Shipping-phone’] = $shipping_phone; foreach ( $shipping_address->toArray() as $key => $value…Continue reading
Ultra Shop button
Shop NowContinue reading
Untitled Snippet
Changing the logo on the WordPress login page.
// Zmiana logo na stronie logowania WordPress. add_filter( ‘login_head’, function () { $custom_logo = ‘https://yourimageurl.com’; $logo_width = 200; $logo_height = 84; printf( ‘ ‘, $custom_logo, $logo_width, $logo_height ); }, 990 );Continue reading
Auto convert photos to WEBP (jpg, png)
/** * Konwertuj przesłane obrazy na format WebP * * Ten fragment kodu automatycznie konwertuje przesłane obrazy (JPEG, PNG, GIF) * do formatu WebP w WordPress. Idealny do umieszczenia w pliku functions.php motywu * lub do korzystania z wtyczek takich…Continue reading