Skip to content

Instantly share code, notes, and snippets.

@wpflippercode
Created September 9, 2017 04:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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