Title: [Plugin: Basic Google Maps Placemarks] placemark theme template test
Last modified: August 20, 2016

---

# [Plugin: Basic Google Maps Placemarks] placemark theme template test

 *  Resolved [mlh1407](https://wordpress.org/support/users/mlh1407/)
 * (@mlh1407)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-placemark-theme-template-test/)
 * I have been working on a solution wherein i could implement some jquery stuff
   in the pluging – and in order to not mod the plugin (as i started with) i started
   building a template for my theme instead – its better than messing up Ian´s code
   🙂
    So if anyone could or would have the use of such – here is a simple way to
   get the placemarksdata from the plugin.
 * template drawing categories :
 *     ```
       <?php
       /*
       Template Name: _forum
       */
       //
       ?>
   
       <?php get_header(); ?>
   
            <?php $category_args = array(
           'orderby'            => 'name',
           'order'              => 'ASC',
       	'taxonomy' 			 => 'bgmp-category'
       	);
       	//
       	$category_names = array();
       	$categories;
   
       	if( $posts )
       				{
       	echo '<div id="filters">';
   
       	$categories = get_categories( $category_args );
        		foreach ($categories as $category) {
       			$name = $category->cat_name;
       			$nice = $category->category_nicename;
       			$id = $category->cat_ID;
       			//
       			echo '<a> '. $name .'</a>';
       			//
       		}
   
       	echo '</div><!-- End filters -->';
       	//
            }
       	 ?>
       <?php get_footer(); ?>
       ```
   
 * and then how to get the content based on these categories :
 *     ```
       <?php
       $queryString = 'fish,boat,flag,car' ; // the categroies from which we want to recieve placemarks
       	   	$lookUpArgs = array(
          'numberposts' => -1,
          'orderby' => 'rand',
          'post_type' => 'bgmp',
          'bgmp-category' =>  $queryString,//bgmp-category
          'post_status' => 'publish'
       	);
       	   //
   
       		$posts = get_posts( $lookUpArgs );	
   
       		if( $posts )
       				{
       					foreach( $posts as $p ) //loop stop
       					{
       					 	$title	= $p->post_title;
       						$address	= get_post_meta( $p->ID, 'bgmp_' . 'address', true );
       						$latitude	= get_post_meta( $p->ID, 'bgmp_' . 'latitude', true );
       						$longitude	= get_post_meta( $p->ID, 'bgmp_' . 'longitude', true );
       						$details	= $p->post_content;
       						// this loop will give you somethng to play with 
   
       						}//foreach stop
       		 }//if posts stop
   
       	wp_reset_query();
   
       ?>
       ```
   
 * i myself started out building the map with jquery ui map and then put my jquery
   ui on top of that solution – but one could also make a filter drop-down-box before
   or after the map and then make a do_shortcode solution (somehow) — anyways. If
   you have any questions just write – by the way – great plugin
 * [http://wordpress.org/extend/plugins/basic-google-maps-placemarks/](http://wordpress.org/extend/plugins/basic-google-maps-placemarks/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Ian Dunn](https://wordpress.org/support/users/iandunn/)
 * (@iandunn)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-placemark-theme-template-test/#post-2623639)
 * Thanks for sharing that mlh1407. You may need to put the code on pastebin, though,
   since the forum mods usually remove anything longer than 10 lines (see the [Posting Code](http://codex.wordpress.org/Forum_Welcome#Posting_Code)
   section of the forum rules).
 *  Thread Starter [mlh1407](https://wordpress.org/support/users/mlh1407/)
 * (@mlh1407)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-placemark-theme-template-test/#post-2623760)
 * here is the link to the theme-template on pastebin : [http://pastebin.com/H7biHufp](http://pastebin.com/H7biHufp)
 *  Plugin Author [Ian Dunn](https://wordpress.org/support/users/iandunn/)
 * (@iandunn)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-placemark-theme-template-test/#post-2623761)
 * Great, thanks 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Basic Google Maps Placemarks] placemark theme template test’
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/)

 * 3 replies
 * 2 participants
 * Last reply from: [Ian Dunn](https://wordpress.org/support/users/iandunn/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-placemark-theme-template-test/#post-2623761)
 * Status: resolved