Have you ever wanted to syndicate events from Events Calendar PRO on a multisite network? Thanks to the good folks at Shenandoah University, you now have the power! The university’s development team recently shared their custom implementation on the forums, and it’s pretty slick.
Geoff Graham, our support guru who many of you have exchanged words with on the forum, gave it a spin today to verify the functionality and was impressed with the end results. It functions just as the SU team suggested: when installed on a multisite network, events published on your primary site will be syndicated to other sites in the network and displayed within the cross-site events widget.Users running the plugin have two widgets available at their disposal: the University Events Calendar widget, and the University Events List widget. The calendar widget follows the traditional grid-based layout. The list widget shows a standard list.
The code can be found on GitHub, and is also embedded at the end of this blog post.
Configuration in our testing was pretty straightforward:
- We created a WordPress multisite installation, which is obviously necessary for using this code.
- The Events Calendar was installed and activated network-wide.
- A new PHP file called events-widgets.php was created and added to a new folder in the theme directory called /lib. The snippet linked to in the forum thread + at the bottom of this blog post was then pasted into the new file.
- We made sure to also include the file in our theme’s functions.php file, by adding this reference: require_once(‘lib/events-widgets.php’);
- Once the base configuration was done, we created 1-2 sites in our newly-created network.
- Events Calendar PRO was installed and activated on a site-by-site basis.
- The two widgets were added to the sidebar and configured accordingly.
- From there, it was just a matter of creating events on the parent site and watching them feed into the widgets we set up on each of the other sites within the network. Heck yes!
Best of all? The widgets appear to function as advertised respect all filters, recurring events and meta information. Events properly link to the source website and do not include events published to any other site on the network.
If you’re running a multisite network and think this may be of value, give it a shot — while neither Modern Tribe nor SU’s dev team provide official support for this snippet (so please don’t ask), we’d love to hear your experience and whether having such functionality in the core plugin would be useful to you.
Big thanks to the team at Shenandoah University for sharing this with us! It’s the exact type of community involvement we love to see surrounding The Events Calendar, and one we’re proud to share with the broader community.
Interested in the code? Check it out: