WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a network with more than 50 sites. I want to create one contact form (which means one shortcode) using contact form 7 or fast secure contact form. Then, I want to use that shortcode on all the 50+ sites so all sites use the same form.

The problem is that when I try to use a shortcode of site A over site B, it's not working.

Do you know how can I use a contact form shortcode globaly on all sites at once?


share|improve this question

closed as off-topic by Pieter Goosen, birgire, toscho Jul 26 '14 at 9:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 1 down vote accepted

A Must Use plugin could do the work.

This is just an outline and has to be fully tested:

add_shortcode( 'global_form', 'shortcode_wpse_87634' );

function shortcode_wpse_87634() 
    // Main site, ID=1, that has the form
    switch_to_blog( 1 );

    // Do your stuff
    $my_stuff = something(); // maybe do_shortcode

    // Back to original site

    // Return shortcode content
    return $my_stuff;

Also, maybe the contact form plugin must be Network activated for this to work.
Having the shortcode available Network-wide will work with the mu-plugin, but to have the form really working globally, that's another issue.

share|improve this answer
I will try that. Thank you very much! – tomastsc Feb 23 '13 at 8:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.