eventsmanager

events list by location

Apr 5th, 2013
697
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function em_location_by_region(){
  2.  
  3. //Use two-character country codes as defined in countrycode.org, can be comma-separated e.g. US,GB,ES
  4. $args = array( 'country' => 'US' );
  5.  
  6. $arr_location = EM_Locations::get($args);
  7.  
  8. foreach( $arr_location as $EM_Location ){
  9. if ( !empty($EM_Location->location_name) ){
  10. echo "<h2>".$EM_Location->location_name."</h2>";
  11. echo do_shortcode('[events_list_grouped mode="monthly" location="'.$EM_Location->location_id.'"] #_EVENTNAME <br> #_ATTENDEESLIST <br><br> [/events_list_grouped]');
  12. echo "<br/>---------------------------------------------------------------------------------------------------<br/>";
  13. }
  14. }
  15.  
  16. }
  17. add_shortcode('location_group', 'em_location_by_region');
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×