Pulling from 1 category post
-
Hello, I was wondering if you could pull multiple post from one category instead of pulling from all the categories that has Google Maps active?
For example, I have two categories, but I only want to display one category on the mashup map. Is there a php code that I can add into my php file?
Below is the php code for the pronamic google map mash that I have. I want to add a code to pull just from one category. I would appreciate it very much if anyone can help me. Thank you.
// THE ICON MARKER function prefix_pronamic_google_maps_marker_options_icon( $url ) { if ( has_category( 'map1' ) ) { return 'http://maps.google.com/mapfiles/ms/icons/blue-dot.png'; } else { return $url; } } add_filter( 'pronamic_google_maps_marker_options_icon', 'prefix_pronamic_google_maps_marker_options_icon' ); /** * Template snippet */ if ( function_exists( 'pronamic_google_maps_mashup' ) ) { pronamic_google_maps_mashup( array( 'post_type' => 'post', 'nopaging' => true ), array( 'width' => 595, 'height' => 500, 'map_type_id' => 'roadmap', 'marker_options' => array( 'icon' => 'http://maps.google.com/mapfiles/ms/icons/blue-dot.png' ) ) ); } ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Pulling from 1 category post’ is closed to new replies.