Title: map marker sort order
Last modified: August 24, 2016

---

# map marker sort order

 *  [mydiskdriveonline](https://wordpress.org/support/users/mydiskdriveonline/)
 * (@mydiskdriveonline)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/map-marker-sort-order/)
 * Greetings,
    My global map is sorting map markers alphabetically by post title,
   I would like by post_date or geo_date.
 * I have tried [geo_mashup_map sort=”geo_date”] with no luck.
 * I also have [geo_mashup_visible_posts_list] on the same page and have tried [
   geo_mashup_visible_posts_list sort=”geo_date”] with no luck either.
 * The post marker I need on top has the newest geo_date and post_date but it is
   the oldest post_id and in the middle alphabetically.
 * I found a possible answer on your support post [https://wordpress.org/support/topic/costum-fields-to-select-posts-for-map](https://wordpress.org/support/topic/costum-fields-to-select-posts-for-map)
 * Would this work?
    ` $custom_query = new WP_Query( array( 'post_type' => 'post','
   orderby' => 'post_date', 'order' => 'DESC' ) );
 * echo GeoMashup::map( array(
    'map_content' => $custom_query, ) );
 * I would prefer a shortcode way. I don’t want to enable php in posts.
 * Thank you for this excellent plugin.
 * Cheerz
 * [https://wordpress.org/plugins/geo-mashup/](https://wordpress.org/plugins/geo-mashup/)

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

 *  Plugin Author [Dylan Kuhn](https://wordpress.org/support/users/cyberhobo/)
 * (@cyberhobo)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/map-marker-sort-order/#post-6159487)
 * The visible posts is currently limited this way – it doesn’t respond to the query
   or the sort parameter. There’s a long standing request to make improvements to
   it that has not been implemented: [https://github.com/cyberhobo/wordpress-geo-mashup/issues/175](https://github.com/cyberhobo/wordpress-geo-mashup/issues/175)
 *  Thread Starter [mydiskdriveonline](https://wordpress.org/support/users/mydiskdriveonline/)
 * (@mydiskdriveonline)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/map-marker-sort-order/#post-6159488)
 * Thanks for the response.
 * I ended up making a page template with:
 *     ```
       $custom_query = new WP_Query( array(
       'post_type' => 'post',
       'orderby' => 'geo_date',
       'order' => 'ASC',
           'map_content' => 'global',
                   'map_type' => 'G_NORMAL_MAP',
       			'posts_per_page' => -1
       ) );
   
       echo GeoMashup::map( array(
       'map_content' => $custom_query,
       ) );
       ```
   
 * I played around with all of the variables and couldn’t get it to work.
 * So if I remove the visible posts tag in the page content will the map then order
   by geo_date?
 *  Plugin Author [Dylan Kuhn](https://wordpress.org/support/users/cyberhobo/)
 * (@cyberhobo)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/map-marker-sort-order/#post-6159491)
 * If you’re talking about z-index order, the map providers have their own behavior
   for that. If I remember Google uses latitude for it, so query order will not 
   affect it at all. You’d have to use the javascript API to change it.
 * [https://github.com/cyberhobo/wordpress-geo-mashup/wiki/Javascript-API](https://github.com/cyberhobo/wordpress-geo-mashup/wiki/Javascript-API)

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

The topic ‘map marker sort order’ is closed to new replies.

 * ![](https://ps.w.org/geo-mashup/assets/icon.svg?rev=1631806)
 * [Geo Mashup](https://wordpress.org/plugins/geo-mashup/)
 * [Support Threads](https://wordpress.org/support/plugin/geo-mashup/)
 * [Active Topics](https://wordpress.org/support/plugin/geo-mashup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/geo-mashup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/geo-mashup/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Dylan Kuhn](https://wordpress.org/support/users/cyberhobo/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/map-marker-sort-order/#post-6159491)
 * Status: not resolved