Title: [Plugin: Basic Google Maps Placemarks] Insert bgmp taxonomy post
Last modified: August 20, 2016

---

# [Plugin: Basic Google Maps Placemarks] Insert bgmp taxonomy post

 *  [aby87](https://wordpress.org/support/users/aby87/)
 * (@aby87)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-insert-bgmp-taxonomy-post/)
 * I want users to be able to add placemarks from the front end using a form. I 
   have the form and am posting to another file where the post data is then put 
   into an array and inserted as a post using wp_insert_post.
 * Depending on which category a user selects the Placemark will be a different 
   coloured marker.
 * My issue is when a user attempts to add a placemark for the first time or have
   cleared their cache, the taxonomy category is not inserted into the database.
   Therefore the default placemark icon is used.
 * Please see my code below.
 * $ptitle = $_POST[‘title’];
    $content = $_POST[‘content’]; $pt = $_POST[‘project_type’];
 * $my_post = array(
    ‘post_title’ => $ptitle , ‘post_type’ => ‘bgmp’, ‘post_content’
   => $content, ‘post_status’ => ‘publish’, ‘post_author’ => 1, ‘tax_input’ => array(‘
   bgmp-category’ => array($pt)) );
 * $post_id = wp_insert_post( $my_post );
 * Thanks in advance for your help!
 * [http://wordpress.org/extend/plugins/basic-google-maps-placemarks/](http://wordpress.org/extend/plugins/basic-google-maps-placemarks/)

The topic ‘[Plugin: Basic Google Maps Placemarks] Insert bgmp taxonomy post’ 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/)

 * 0 replies
 * 1 participant
 * Last reply from: [aby87](https://wordpress.org/support/users/aby87/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-basic-google-maps-placemarks-insert-bgmp-taxonomy-post/)
 * Status: not resolved