Support » Plugin: Pronamic Google Maps » [Plugin: Pronamic Google Maps] Mashup map different icons by post categories

  • Resolved c001os

    (@c001os)


    Hi!

    I want to use different icons, based on post categories. I find a code that do the job with post types. Any idea how can i transform it into post categories?

    The example:

    function prefix_pronamic_google_maps_marker_options_icon($url) {
    	switch(get_post_type()) {
    		case 'post':
    			$url = 'http://google-maps-icons.googlecode.com/files/seniorsite.png';
    			break;
    		case 'page':
    			$url = 'http://google-maps-icons.googlecode.com/files/university.png';
    			break;
    	}
    
    	return $url;
    }
    
    add_filter('pronamic_google_maps_marker_options_icon', 'prefix_pronamic_google_maps_marker_options_icon');

    http://wordpress.org/extend/plugins/pronamic-google-maps/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Pronamic Google Maps] Mashup map different icons by post categories’ is closed to new replies.