try something like
$EM_Events = EM_Events::get(array('scope'=>'all','tag'=>'music'));
foreach ( $EM_Events as $EM_Event ) {
echo $EM_Event->output('#_EVENTNAME');
}
http://wp-events-plugin.com/documentation/placeholders/
http://wp-events-plugin.com/documentation/event-search-attributes/
It works very well, thanks angelo! But for my purpose it’s better to learn how to use the conditional tags listed in the em-template-tags.php file! It would be very useful! Can you make me an example maybe?
I think function em_are_events_available() is also using the above object EM_Events::get() which is quite similar to the function I shared.
Thanks for your help angelo!
I use this
if ( (em_are_events_available( array ('scope'=>'all', 'tag'=>'music' ) ) ) > 0 ) echo 'hello'
but it prints me hello also if there aren’t events tagged with music!
Your use of em_are_events_available() isn’t valid – it only takes one parameter – $scope.
Angelo was pointing to that as an example of how to use EM_Event::get()
If you take a look at that function in the code you’ll see the various parameters it accepts.
Thanks