Last active
September 8, 2017 05:38
-
-
Save wpflippercode/d59d0e7d8986b7f008acb484c8628477 to your computer and use it in GitHub Desktop.
Show Locations by Category on the google maps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('wpgmp_location_criteria', 'wpgmp_location_criteria',1,2 ); | |
function wpgmp_location_criteria($location_criteria,$map) { | |
//This will apply for map id 1. | |
if( $map->map_id == 1) { | |
$location_criteria['show_all_locations'] = true; | |
$location_criteria['category__in'] = array(1,2,3); // You can use category name as well. | |
} | |
return $location_criteria; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment