Archives: Snippets
connect site to google
Increase Dropdown Menu Width – Divi Themes
.et_pb_menu ul.sub-menu { width: 300px; /* Adjust this value to your desired width */ } /* Optional: Adjust width of individual list items and links within the dropdown */ .et_pb_menu ul.sub-menu li { width: 100%; /* Ensures list items take…Continue reading
Normalize
// Add custom styles if ( ! function_exists( ‘add_custom_style_normalize’ ) ) { function add_custom_style_normalize() { // The New Normal CSS wp_register_style( ‘the-new-normal-css’, ‘https://cdn.jsdelivr.net/gh/sarahschopick/the-new-normal.css@main/the-new-normal.min.css’, array(), ‘1.0.0’ ); wp_enqueue_style( ‘the-new-normal-css’ ); // Alternative normalization stylesheets (only use one) // Normalize: https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css //…Continue reading
Get Wholesale Price Array For A Product Based On A Wholesale Role
/** * Class that handles wholesale price HTML generation and display. * * @since 1.0.0 */ class WWP_Wholesale_Price_HTML_Handler { /** * Model that houses the logic of retrieving information relating to wholesale role/s of a user. * * @since 1.5.0…Continue reading
Show Wholesale Prices Text In Single Product Page For Wholesale Role Customers
/** * First Remove The Existing Pricing Filter So That It Will Be Available To All Users */ add_action(‘init’, ‘remove_existing_pricing_html’, 10); function remove_existing_pricing_html() { global $wc_wholesale_prices; remove_filter(‘woocommerce_get_price_html’, [$wc_wholesale_prices->wwp_for_non_wholesale_customer,’add_click_wholesale_price_for_non_wholesale_customers’], 10 ); } /** * Include Pricing HTML for all users */…Continue reading
Countdown
/* Import Playfair Display font from Google Fonts */ @import url(‘https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap’); /* Ensure consistent box model */ .countdown-container-custom, .countdown-segment-custom { box-sizing: border-box; } /* Main Container Styling */ .countdown-container-custom { text-align: center; padding: 40px 15px; background-color: #1a1a1a; background-image: url(‘https://lightsatthefair.com/wp-content/uploads/sites/5/2025/07/d6fb9991-6832-4b5c-bbfb-8029f85998e2-1024×676.png’); background-size:…Continue reading