Skip to content

Instantly share code, notes, and snippets.

@eduard-un
Created November 18, 2015 17:34
Show Gist options
  • Save eduard-un/f5f57ae74964aff6f89c to your computer and use it in GitHub Desktop.
Save eduard-un/f5f57ae74964aff6f89c to your computer and use it in GitHub Desktop.
Load the Custom Contact Form Module in Divi 2.5.6
<?php
/*
=== Use the custom module ===
*/
function divi_child_theme_setup() {
if ( class_exists('ET_Builder_Module')) {
get_template_part( 'custom-modules/ccfm' );
$ccfm = new WPC_ET_Builder_Module_Contact_Form ();
remove_shortcode( 'et_pb_contact_form' );
add_shortcode( 'et_pb_contact_form', array($ccfm, '_shortcode_callback') );
}
}
add_action('wp', 'divi_child_theme_setup', 9999);
@garek007
Copy link

garek007 commented Feb 4, 2019

Thanks this helped me out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment