function custom_countdown_timer() { date_default_timezone_set(‘Europe/London’); // Ensure the correct timezone is set // Get current day and time $current_day = date(‘w’); // 0 (for Sunday) through 6 (for Saturday) $current_hour = date(‘G’); $start_countdown = false; // Default state is to not…Continue reading
/** * Exclude Post Type from Search */ add_action(‘init’, ‘excludePostTypeFromSearch’, 99); function excludePostTypeFromSearch(){ global $wp_post_types; if(post_type_exists(‘post’) && isset($wp_post_types[‘post’])){ $wp_post_types[‘post’]->exclude_from_search = true; } if(post_type_exists(‘page’) && isset($wp_post_types[‘page’])){ $wp_post_types[‘page’]->exclude_from_search = true; } }Continue reading
add_action(‘woocommerce_before_single_product’, ‘custom_woocommerce_product_modifications’); add_action(‘woocommerce_before_shop_loop_item’, ‘custom_woocommerce_product_modifications’, 10); add_action(‘woocommerce_after_shop_loop_item’, ‘custom_remove_add_to_cart_buttons’, 1); function custom_woocommerce_product_modifications() { global $product; if (!is_a($product, ‘WC_Product’)) { return; } $product_id = $product->get_id(); $parent_id = $product->is_type(‘variation’) ? $product->get_parent_id() : $product_id; // Retrieve the terms for the ‘pa_brand’ attribute for the product…Continue reading
/* LÄGGER TILL BESKRIVNING UNDER PRISET FÖR PRODUKTER EJ I LAGER ELLER EJ KÖPBAR */ add_action( ‘woocommerce_single_product_summary’, ‘visa_produktbeskrivning’, 40 ); function visa_produktbeskrivning() { global $product; if ( ! $product->is_in_stock() || $product->get_stock_status() == ‘ej-kop’ ) { echo ‘ ‘; echo apply_filters(…Continue reading
/* LÄGGER TILL BESKRIVNING UNDER PRISET FÖR PRODUKTER EJ I LAGER ELLER EJ KÖPBAR */ add_action( ‘woocommerce_single_product_summary’, ‘visa_produktbeskrivning’, 40 ); function visa_produktbeskrivning() { global $product; if ( ! $product->is_in_stock() || $product->get_stock_status() == ‘ej-kop’ ) { echo ‘ ‘; echo apply_filters(…Continue reading
add_filter( ‘tasty_recipes_min_rating_without_comment’, function() { return 6; // Require comments for 4 and 5 star ratings too. } );Continue reading
function insert_nort_proof() { $nortbeam_script = ‘‘; $proof_script = ‘‘; echo $nortbeam_script; echo $proof_script; } add_action( “wp_head”, “insert_nort_proof”, 0 );Continue reading
// This code snippet ensures that vendors are displayed in the following order: // – Featured vendors (vendor posts with ‘status_ven_featured’ set to 1) in ascending order by post title // – Love list vendors (vendor posts with ‘status_ven_love_list’ set…Continue reading
add_filter( ‘render_block_tasty-roundups/item’, function ( $block ) { $initial_block = $block; $block = preg_replace( ‘~Continue reading
jQuery(“footer”).append(“ Site managed by Maintain+ “)Continue reading