/** * WPCode Snippet: GravityView Sync System – MANUAL SYNC ONLY * Description: Syncs GravityView configurations to custom post type * Location: Run Everywhere * Priority: 20 * Based on proven Gravity Forms sync patterns * * ⚠️ AUTO-SYNC DISABLED…Continue reading
/** * WPCode Snippet: GravityView Views ACF Fields * Description: Registers ACF fields for GravityView configurations and settings * Location: Run Everywhere * Priority: 10 */ defined( ‘ABSPATH’ ) || exit; add_action( ‘acf/init’, function() { if ( ! function_exists( ‘acf_add_local_field_group’…Continue reading
/** * WPCode Snippet: GravityView Views CPT Registration * Description: Registers custom post type for GravityView with full REST API support * Location: Run Everywhere * Priority: 0 */ defined( ‘ABSPATH’ ) || exit; add_action( ‘init’, function() { $labels =…Continue reading
// 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
function shortcode_merken_logos() { // Probeer eerst ‘pa_brand’ $terms = get_terms(array( ‘taxonomy’ => ‘pa_brand’, ‘hide_empty’ => false, )); // Als ‘pa_brand’ leeg is of niet bestaat, gebruik ‘pa_merk’ if (empty($terms) || is_wp_error($terms)) { $terms = get_terms(array( ‘taxonomy’ => ‘pa_merk’, ‘hide_empty’ =>…Continue reading
// Forceer aangepaste vertalingen met ondersteuning voor NL / EN / DE function translated_text_strings( $translated_text, $text, $domain ) { // Haal de huidige site-taal op (bv. ‘nl_NL’, ‘en_US’, ‘de_DE’) $locale = get_locale(); switch ( $translated_text ) { // Algemene WooCommerce…Continue reading
// 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
// Hide quantity on single product, except for Product Bundles function custom_remove_quantity_field_single( $return, $product ) { // Check if we are on a single product page if ( is_product() ) { // Controleer of het product een bundel is if…Continue reading
// 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
// This snippet ONLY runs on MOBILE devices. // It checks if the user is on a desktop page and sends them to the mobile version. add_action( ‘template_redirect’, function() { // — Define your page pairs — // ‘desktop_page_slug’ =>…Continue reading