Instantly share code, notes, and snippets.

Embed
What would you like to do?
Show Posts of a specific category on the google maps
add_filter('wpgmp_post_args', 'wpgmp_post_args',1,2 );
function wpgmp_post_args($args,$map) {
global $post;
if(is_category(1)) {
$args['category__in'] = 1; // Show Posts of Category ID = 1 on the google maps.
}
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment