Support » Plugin: Events Manager » Pushing events to only select calendars

  • Resolved Cameron Barrett


    We are a large school district with thousands of events in our calendars across 70+ sites (multisite).

    I’ve been trying to figure out if this is possible.

    Right now, we have a custom shortcode called [newark_calendar] that renders a full calendar on each child site that contains all events from blog_id=1 plus events stored in each respective child site’s calendar. This way, we can publish “district events” and they automatically get shown in each child site’s calendar.

    add_shortcode( 'newark_calendar', 'schoolpress_calendar' );
    function schoolpress_calendar( $full ){
    	global $blog_id;
    	if ( $full != '0' )
    		$full = '1';
    	$html = '';
    	if ( 1 == $blog_id )
    		$html .= do_shortcode( '[events_search]' );
    	$html .= do_shortcode( '[events_calendar long_events=1 full='.$full.' blog="1,'.$blog_id.'"]' );
    	return $html;

    The short code for the district site calendar (blog=1) is this:
    [events_calendar long_events=1 full=1 blog=1]

    Now, we have a need to tag events so they only go to some school calendars but not all. For instance, an event in the District site calendar should just show up on the High School child sites but not the elementary schools.

    I thought of doing something like this:

    [newark_calendar full=1 blog=64 tag=highschools]

    …where the event in the district calendar is tagged with a custom tag called “highschools”.

    But I’m not sure I’m think about this correctly. Has anyone achieved this type of behavior with multiple calendars? Is it even possible with Events Manager?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support angelo_nwl


    I see what you mean; I’m going to confirm this with the devs and get back to you.

    Plugin Author Marcus


    This is possible, but you’d need to use categories rather than tags.

    Categories are shared across the network and are managed from the main blog, whereas tags are not and are specific to each blog.

    With that, you can include or exclude categories across your whole network.

    I should add, there’s a few issues with your code there. I’d suggest checking how we generate our lists in our own shortcodes in em-shortcodes.php

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pushing events to only select calendars’ is closed to new replies.