CL LeadCapsule Dynamic Post Working Console Old V1

add_filter( ‘ninja_forms_submit_data’, ‘leadcapsule_final_post’ ); function leadcapsule_final_post( $form_data ) { $form_id = $form_data[‘id’]; $payload = array(); $is_leadcapsule_form = false; // ========================================== // THE MASTER FIELD MAP (37 Form Fields) // ========================================== $field_map = array( ‘txt_campaign_id’ => ‘CampaignId’, ‘txt_first_name’ => ‘FirstName’, ‘txt_last_name’…Continue reading

Single product – Custom label

/** * 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

Vakantiebanner nieuw

/* ========================================================= 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

Hide Calendar Event Pages From Being Indexed

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