/** * WPCode Snippet: Expose GravityView ACF Fields to REST API (Application Password Auth Required) * Description: Makes ALL GravityView data accessible ONLY via Application Password authentication * Location: Run Everywhere * Priority: 15 */ defined( ‘ABSPATH’ ) || exit;…Continue reading
/** * WPCode Snippet: Auto-Populate GravityView Field Details on CPT Sync * Location: Run Everywhere * Priority: 30 * Description: Hooks into GravityView sync to populate detailed field information */ defined( ‘ABSPATH’ ) || exit; /** * Hook into GravityView…Continue reading
/** * WPCode Snippet: GravityView Sync System * Description: Syncs GravityView configurations to custom post type * Location: Run Everywhere * Priority: 20 * Based on proven Gravity Forms sync patterns */ defined( ‘ABSPATH’ ) || exit; /** * ==========================================…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
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
// 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
// ACF Options page add_action(‘acf/init’, function() { if ( function_exists(‘acf_add_options_page’) ) { acf_add_options_page(array( ‘page_title’ => ‘Winkelinstellingen’, ‘menu_title’ => ‘Winkelinstellingen’, ‘menu_slug’ => ‘instellingen’, ‘capability’ => ‘edit_posts’, ‘redirect’ => true, )); } }); // ACF read only fields function wwk_acf_read_only_field( $field )…Continue reading
// Verberg availability/stock tekst voor variaties met ‘Toestaan, maar klant informeren’ add_filter( ‘woocommerce_get_availability_text’, function( $availability, $product ) { if ( $product && $product->is_type(‘variation’) ) { // toon geen availability tekst als backorders toegestaan zijn mét notificatie en het item op…Continue reading