Advanced Usage

Hey! Try out our new documentation pages, hope you like it!

Events Manager uses an Object Oriented approach to handling events. This opens up lots of possibilities for developers as you can now easily change the way events are displayed on your website with much less code and in a much more upgrade-safe manner.

As time permits, we’ll update this page with a more comprehensive documentation highlighting the full extent of Events Manager’s power and flexibility. Here are a few basic commands to get you started.

EM_Events::output( $args )

This will print out a list of events. The $args variable should be an array with any event accepted arguments. This is a very powerful function as you have a fine grained control of what events are shown, what format to show them in, etc.

Example:

if (class_exists('EM_Events')) {
	echo EM_Events::output( array('limit'=>10,'orderby'=>'name') );
}

EM_Calendar::output( $args )

Will return an html calendar string, populated with the events that match the given arguments in $args, which should be an array with any calendar accepted arguments.

Example:

if (class_exists('EM_Calendar')) {
	echo EM_Calendar::output( array('long_events'=>1, 'location'=>'1') );
}

EM_Locations::output( $args )

Will return a list of locations, that match the given arguments in $args, which should be an array with any calendar accepted arguments.

Example:

if (class_exists('EM_Locations')){
	echo EM_Locations::output( array('limit'=>'10','orderby'=>'name') );
}


Interested in Events Manager?

Sign up to our newsletter, receive a free add-on and an additional 10% discount for Pro!

You will receive a confirmation email which you must click on, you will then be sent another welcome email with links to your discount and free add-on.