Homepage – Loving the Lost PG info – generate shortcodes – PROD LIBRARY

// Register shortcodes add_shortcode(‘lol_nmdisp’, ‘lol_nmdisp_shortcode’); add_shortcode(‘lol_ctry’, ‘lol_ctry_shortcode’); add_shortcode(‘lol_pop’, ‘lol_pop_shortcode’); add_shortcode(‘lol_spidesc’, ‘lol_spidesc_shortcode’); add_shortcode(‘lol_lpidesc’, ‘lol_lpidesc_shortcode’); add_shortcode(‘lol_peopledesc’, ‘lol_peopledesc_shortcode’); add_shortcode(‘lol_rlgn’, ‘lol_rlgn_shortcode’); add_shortcode(‘lol_lang’, ‘lol_lang_shortcode’); add_shortcode(‘lol_pgid’, ‘lol_pgid_shortcode’); function lol_nmdisp_shortcode() { $data = get_current_week_people_data(); return esc_html($data[‘NmDisp’] ?? ‘[Missing: NmDisp]’); } function lol_ctry_shortcode() { $data = get_current_week_people_data(); return…Continue reading

Product category – Add-ons – USP bar

// Productcategorie banner add_action(‘generate_after_header’, ‘toon_extra_content_boven_productcategorie’, 11); function toon_extra_content_boven_productcategorie() { if (!is_product_category()) return; $term = get_queried_object(); if (!$term || !isset($term->term_id)) return; $extra_content = get_field(‘extra_content_optioneel’, ‘product_cat_’ . $term->term_id); $thumbnail = get_field(‘thumbnail’, ‘product_cat_’ . $term->term_id); if ($extra_content || $thumbnail) { echo ‘ ‘;…Continue reading

Single product – Pro’s & Con’s

// Show plus/min description tab (zonder ACF, met standaard meta – robuust) add_filter(‘woocommerce_product_tabs’, ‘meta_plus_minpunten_boven_description’, 20); function meta_plus_minpunten_boven_description($tabs) { if (!is_product()) return $tabs; $theme_dir = get_stylesheet_directory_uri(); // voor svg-pad $product_id = get_the_ID(); // Haal meta op (kan string, array of genest…Continue reading

Single product – Maattabel

// Maattabel popup op single product function toon_maattabel_popup_van_pa_merk_of_brand() { if ( ! is_product() ) { return; } $product_id = get_the_ID(); // Controleer eerst welke taxonomie beschikbaar is voor dit product $taxonomies = [‘pa_merk’, ‘pa_brand’, ‘pa_brands’, ‘pa_marke’]; // Voeg eventueel meer…Continue reading

Product category – Reviews

add_filter( ‘woocommerce_product_get_rating_html’, function( $html, $rating, $count ) { if ( is_product() || ! $html ) { return $html; // alleen aanpassen op archiefpagina’s met sterren } global $product; if ( ! $product instanceof WC_Product ) { return $html; } $review_count…Continue reading

Single product – Move price – Producttitle – Rating

// Move single product title remove_action(‘woocommerce_single_product_summary’, ‘woocommerce_template_single_title’, 5); add_action(‘woocommerce_before_single_product_summary’, ‘woocommerce_template_single_title’, 10); // Verplaats alleen de rating (sterren + “(x klantbeoordelingen)”) remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_rating’, 10 ); add_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_template_single_rating’, 12 ); // Verplaats productprijs voor álle producttypes add_action(‘woocommerce_single_product_summary’, ‘custom_move_product_price’, 1); function…Continue reading

Single product – Add visual SKU

// Add SKU under title add_action(‘woocommerce_single_product_summary’, ‘plaats_sku_onder_titel’, 11); function plaats_sku_onder_titel() { global $product; if ( $product->get_sku() ) { echo ‘ ‘ . esc_html__( ‘Referentie:’, ‘Woocommerce’ ) . ‘ ‘ . esc_html( $product->get_sku() ) . ‘ ‘; } }Continue reading

Single product – Spaarbedrag shortcode

// Shortcode: [spaar_bedrag] function shortcode_spaar_bedrag() { if ( ! is_product() ) { return ”; } global $product; if ( ! $product instanceof WC_Product ) { return ”; } // Zorg dat je altijd een concrete prijs hebt (ook bij variaties)…Continue reading