function impBrandsArchive( $query ) { $query->set( ‘post_type’, [ ‘hot-tubs’, ‘swim-spas’, ‘saunas’ ] ); } add_action( ‘elementor/query/brands_archive’, ‘impBrandsArchive’ ); /** * Action: ‘rank_math/vars/register_extra_replacements’ – Allows adding extra variables. */ add_action( ‘rank_math/vars/register_extra_replacements’, function(){ rank_math_register_var_replacement( ‘dealer_currency’, [ ‘name’ => esc_html__( ‘Dealer Currency’, ‘rank-math’…Continue reading
function impDisplayARWrapperIframe() { $post_id = get_the_ID(); $product_ar = get_post_meta($post_id, ‘product_ar_iframe’, true); if(!empty($product_ar)) { $html_code = ‘‘; } else { $product_ar = get_post_meta($post_id, ‘ar_code’, true); $html_code = ‘‘; } return $html_code; } add_shortcode(‘display-ar-wrapper-iframe’, ‘impDisplayARWrapperIframe’); function impDisplayARWrapperIframeMassagechairs() { $post_id = get_the_ID(); $product_ar…Continue reading
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
add_action( ‘template_redirect’, ‘rd_preload_marked_theme_background_images’, 1 ); function rd_preload_marked_theme_background_images() { if ( is_admin() || wp_doing_ajax() || wp_is_json_request() ) { return; } if ( defined( ‘REST_REQUEST’ ) && REST_REQUEST ) { return; } if ( is_feed() || is_trackback() || is_robots() || is_embed() )…Continue reading
add_action(‘template_redirect’, function () { if (isset($_GET[‘rd_test_wp_die’])) { if (!defined(‘DONOTCACHEPAGE’)) { define(‘DONOTCACHEPAGE’, true); } if (!defined(‘DONOTCACHEDB’)) { define(‘DONOTCACHEDB’, true); } if (!defined(‘DONOTMINIFY’)) { define(‘DONOTMINIFY’, true); } nocache_headers(); wp_die(‘This would be the default WordPress Admin Error Message.’); } });Continue reading
/** * Convert Uploaded Images to WebP Format * * This snippet converts uploaded images (JPEG, PNG, GIF) to WebP format * automatically in WordPress. Ideal for use in a theme’s functions.php file, * or with plugins like Code Snippets…Continue reading
/** * Convert Uploaded Images to WebP Format * * This snippet converts uploaded images (JPEG, PNG, GIF) to WebP format * automatically in WordPress. Ideal for use in a theme’s functions.php file, * or with plugins like Code Snippets…Continue reading
/* * MS GROUP WEBSITE — VERSION B * JavaScript — Scroll Reveal Animations * ============================================================ * Uses IntersectionObserver to fade elements up on scroll. * In WordPress, this can be replaced with: * – Elementor entrance animations (built-in) *…Continue reading