/** * ACF-productlabel tonen. */ function ld_product_label() { if (!function_exists(‘get_field’)) { return; } global $product; if (!$product instanceof WC_Product) { return; } $label_text = get_field(‘label_tekst’, $product->get_id()); $kleur = get_field(‘achtergrondkleur’, $product->get_id()); if (!$label_text) { return; } if (!$kleur) { $kleur =…Continue reading
/* ========================================================= Vakantie-popup met instellingenpagina — WPCode PHP snippet – Menu-item “Vakantie popup” in het WordPress-menu – Sitenaam wordt automatisch uit de websitetitel gehaald – Start- en einddatum, teksten en icoon instelbaar – Testknop toont de popup direct in het…Continue reading
global $wc_wholesale_prices_premium; remove_filter( ‘option_woocommerce_tax_display_shop’, array( $wc_wholesale_prices_premium->wwpp_tax, ‘wholesale_tax_display_shop’ ) ); remove_filter( ‘option_woocommerce_tax_display_cart’, array( $wc_wholesale_prices_premium->wwpp_tax, ‘wholesale_tax_display_cart’ ) );Continue reading
add_post_type_support( ‘page’, ‘excerpt’ );Continue reading
add_action(‘template_redirect’, function() { if (!empty($_GET[‘mc_id’]) || is_singular(‘mc-events’)) { header(‘Location: ‘ . home_url(‘/upcomingevents/’), true, 301); exit; } }); add_action(‘init’, function() { global $wp_post_types; if (isset($wp_post_types[‘mc-events’])) { $wp_post_types[‘mc-events’]->public = false; $wp_post_types[‘mc-events’]->publicly_queryable = false; $wp_post_types[‘mc-events’]->exclude_from_search = true; } }, 99);Continue reading
/* * Snippet #83 (ID 36495): People Group Profile page — LTL banner display * * Runs on wp_head for people_groups CPT pages. * Controls the .LTL-banner button block already placed in the page template. * * Behaviour: * –…Continue reading
/* * Snippet #102 (ID 37769): People Group Profile page — LTL Banner display * * Shortcode: [ltl_banner] * Place on the People Group profile page template where the banner should appear. * * Behaviour: * – Reads the current…Continue reading
$rlgn = get_field(‘Rlgn’); // Get the ACF field value if (!$rlgn) return; // Define the color mapping $colors = [ ‘Ethnoreligion’ => ‘#590cc6’, ‘Buddhism’ => ‘#c61836’, ‘Hinduism’ => ‘#d87716’, ‘Judaism’ => ‘#ede71d’, ‘Islam’ => ‘#0b7034’, ‘Shinto’ => ‘#6d0c23’, ‘Sikh’ =>…Continue reading