Title: [Plugin: Basic Google Maps Placemarks] category ID
Last modified: August 20, 2016

---

# [Plugin: Basic Google Maps Placemarks] category ID

 *  Resolved [stuffedhippo](https://wordpress.org/support/users/stuffedhippo/)
 * (@stuffedhippo)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-category-id/)
 * I can get the custom place markers to work on each entry but I am trying to get
   them to work on categories!
 *     ```
       function setBGMPDefaultIcon( $iconURL, $placemarkID )
       {
           if( $placemarkID == 141 ) // change this to be whatever condition you want
               $iconURL = get_bloginfo( 'stylesheet_directory' ) . '/images/map-pin-blue.png';
   
           return $iconURL;
       }
       add_filter( 'bgmp_default-icon', 'setBGMPDefaultIcon', 10, 2 );
       ```
   
 * The above is the example give on the FAQ page and I know I need to change the`
   $placemarkID` but tried lots of things but can’t get it to work.
 * Any help please.
 * Many thanks
 * stuffedhippo
 * [http://wordpress.org/extend/plugins/basic-google-maps-placemarks/](http://wordpress.org/extend/plugins/basic-google-maps-placemarks/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [stuffedhippo](https://wordpress.org/support/users/stuffedhippo/)
 * (@stuffedhippo)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-category-id/#post-2589080)
 *     ```
       function setBGMPDefaultIcon( $iconURL, $placemarkID )
       {
       	$placemarkCategories = wp_get_object_terms( $placemarkID, 'bgmp-category' );
   
       	foreach( $placemarkCategories as $pc )
       		if( $pc->slug == 'restaurants' )
       			$iconURL = get_bloginfo( 'stylesheet_directory' ) . '/images/bgmp-default-icon.png';
   
           return $iconURL;
       }
       add_filter( 'bgmp_default-icon', 'setBGMPDefaultIcon', 10, 2 );
       ```
   
 * Found this in another thread!

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Basic Google Maps Placemarks] category ID’ is closed to new 
replies.

 * ![](https://ps.w.org/basic-google-maps-placemarks/assets/icon-128x128.png?rev
   =1152531)
 * [Basic Google Maps Placemarks](https://wordpress.org/plugins/basic-google-maps-placemarks/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/basic-google-maps-placemarks/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/basic-google-maps-placemarks/)
 * [Active Topics](https://wordpress.org/support/plugin/basic-google-maps-placemarks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/basic-google-maps-placemarks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/basic-google-maps-placemarks/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [stuffedhippo](https://wordpress.org/support/users/stuffedhippo/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-category-id/#post-2589080)
 * Status: resolved