WordPress.org

Ready to get started?Download WordPress

Forums

Pronamic Google Maps
[resolved] Mashup map different icons by post categories (4 posts)

  1. c001os
    Member
    Posted 1 year ago #

    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/

  2. Remco Tolsma
    Member
    Plugin Author

    Posted 1 year ago #

  3. c001os
    Member
    Posted 1 year ago #

    Thank You!

  4. c001os
    Member
    Posted 1 year ago #

    Works like a charm! Very smart solution! Thanx again!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.