Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function em_location_by_region(){
- //Use two-character country codes as defined in countrycode.org, can be comma-separated e.g. US,GB,ES
- $args = array( 'country' => 'US' );
- $arr_location = EM_Locations::get($args);
- foreach( $arr_location as $EM_Location ){
- if ( !empty($EM_Location->location_name) ){
- echo "<h2>".$EM_Location->location_name."</h2>";
- echo do_shortcode('[events_list_grouped mode="monthly" location="'.$EM_Location->location_id.'"] #_EVENTNAME <br> #_ATTENDEESLIST <br><br> [/events_list_grouped]');
- echo "<br/>---------------------------------------------------------------------------------------------------<br/>";
- }
- }
- }
- add_shortcode('location_group', 'em_location_by_region');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement