We have a multisite installation of Wordpress where we show events from subsites on the main blog.

for the detailed event pages which are shown on the main blog we would like to detect from which blog they coming from.

We need to execute a switch_blog($numberblog) where $numberblog is the ID of the blog who owns the event.

Could not find a function which does this, anyone able to help out?

  • It might useful to give a little extra detail, like an example of the type of event you are tracking. Are these real-life events, like Events Manager Pro uses, or are these code-level events, like a user logged in? – JJ Rohrer Jun 22 '15 at 17:00
  • You're right will add more specific info next time. In this case it was an event from Events Manager Pro, where we found the answer. These events have a blog id attached to it which solved the issue. – sc11423 Jun 23 '15 at 8:02

the plugin we used for the events (Events Manager Pro) had an extra metadata field for each event which contained the blog id so this problem is solved

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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