Title: Different post types
Last modified: December 29, 2021

---

# Different post types

 *  Resolved [tsekou](https://wordpress.org/support/users/tsekou/)
 * (@tsekou)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/different-post-types-2/)
 * Hello, How could i display in a map different post types with different color
   markers? Is there a way to do this?

Viewing 1 replies (of 1 total)

 *  Plugin Author [dgamoni](https://wordpress.org/support/users/dgamoni/)
 * (@dgamoni)
 * [4 years ago](https://wordpress.org/support/topic/different-post-types-2/#post-15665882)
 * Hi
    you can updated custom field ‘locate-anything-marker-color’ on loop for each
   CPT eg
 *     ```
       $args = array(
       	'post_type' => 'place',
       	'post_status' => 'publish',
       	'posts_per_page'  => -1,
       );
       $the_query = new WP_Query( $args );
   
       while ( $the_query->have_posts() ) : $the_query->the_post();
       	update_post_meta( $post->ID, 'locate-anything-marker-color', 'red' )[0];
       endwhile;
       wp_reset_query();
   
       $args = array(
       	'post_type' => 'place2',
       	'post_status' => 'publish',
       	'posts_per_page'  => -1,
       );
       $the_query = new WP_Query( $args );
   
       while ( $the_query->have_posts() ) : $the_query->the_post();
       	update_post_meta( $post->ID, 'locate-anything-marker-color', 'blue' )[0];
       endwhile;
       wp_reset_query();					
       ```
   
    -  This reply was modified 4 years ago by [Yui](https://wordpress.org/support/users/fierevere/).
    -  This reply was modified 4 years ago by [dgamoni](https://wordpress.org/support/users/dgamoni/).

Viewing 1 replies (of 1 total)

The topic ‘Different post types’ is closed to new replies.

 * ![](https://ps.w.org/locateandfilter/assets/icon-128x128.png?rev=2050267)
 * [LocateAndFilter](https://wordpress.org/plugins/locateandfilter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/locateandfilter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/locateandfilter/)
 * [Active Topics](https://wordpress.org/support/plugin/locateandfilter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/locateandfilter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/locateandfilter/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [dgamoni](https://wordpress.org/support/users/dgamoni/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/different-post-types-2/#post-15665882)
 * Status: resolved