One form multisite
-
I’m hoping to use CF7 on my multisite installation in a way I can use one form on all my sites. Until now it’s working great, using the following code I have managed to show the form on all sites:
function shortcode_wpse_87634() { // Main site, ID=1, that has the form switch_to_blog( 1 ); // Do your stuff $my_stuff = do_shortcode('[contact-form-7 id="71" title="Contact"]'); // Back to original site restore_current_blog(); // Return shortcode content return $my_stuff; } add_shortcode( 'global_form', 'shortcode_wpse_87634' );
Validation of the form works on the main domain, but not on child domains and I can’t seem to find out why. Is this something that should work or am I looking to do the impossible?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘One form multisite’ is closed to new replies.