Title: Sort by nearest store
Last modified: September 27, 2020

---

# Sort by nearest store

 *  [esatkaraer](https://wordpress.org/support/users/esatkaraer/)
 * (@esatkaraer)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/sort-by-nearest-store/)
 * Hi,
 * Is it possible to sort the stores list on a custom field?
 * In my case, after the customer enters his location/zipcode, I want the store 
   list items to sort by the distance to the customers location.
 * Thanks,
 * Esat

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

 *  Thread Starter [esatkaraer](https://wordpress.org/support/users/esatkaraer/)
 * (@esatkaraer)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/sort-by-nearest-store/#post-13459996)
 * Also,
 * I want to be able to sort it by whether the shop is open or closed?
    If this 
   is possible, that would be even better.
 * Thanks
 *  Plugin Author [WC Lovers](https://wordpress.org/support/users/wclovers/)
 * (@wclovers)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/sort-by-nearest-store/#post-13461321)
 * > In my case, after the customer enters his location/zipcode, I want the store
   > list items to sort by the distance to the customers location.
 * – Sorry, it’s not possible to sort by distance as it’s not a saved values. Distance
   always calculated dynamically based on customer’s location.
 *  Thread Starter [esatkaraer](https://wordpress.org/support/users/esatkaraer/)
 * (@esatkaraer)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/sort-by-nearest-store/#post-13475862)
 * And how about sorting by open and closed shops.
 * So open shops always on top in de listing.
 *  Plugin Author [WC Lovers](https://wordpress.org/support/users/wclovers/)
 * (@wclovers)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/sort-by-nearest-store/#post-13482614)
 * It’s also dynamic condition.
 *  Thread Starter [esatkaraer](https://wordpress.org/support/users/esatkaraer/)
 * (@esatkaraer)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/sort-by-nearest-store/#post-13485129)
 * Can you tell me the location of where the ordering is done in code, I want to
   add some custom code to accomplish this.
 * If I succeed I will share it here as a solution.
 * Thanks
 *  Plugin Author [WC Lovers](https://wordpress.org/support/users/wclovers/)
 * (@wclovers)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/sort-by-nearest-store/#post-13488926)
 * It’s from here – \wp-content\plugins\wc-multivendor-marketplace\core\class-wcfmmp-
   vendor.php line 2858
 * But it’s preferable not to edit core files. You may modify this query args parameters
   using this filter – wcfmmp_vendor_list_args
 * Or, may manipulate result using this filter – wcfmmp_vendor_list

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

The topic ‘Sort by nearest store’ is closed to new replies.

 * ![](https://ps.w.org/wc-multivendor-marketplace/assets/icon-256x256.gif?rev=2611991)
 * [WCFM Marketplace - Multivendor Marketplace for WooCommerce](https://wordpress.org/plugins/wc-multivendor-marketplace/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wc-multivendor-marketplace/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wc-multivendor-marketplace/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-multivendor-marketplace/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-multivendor-marketplace/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-multivendor-marketplace/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [WC Lovers](https://wordpress.org/support/users/wclovers/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/sort-by-nearest-store/#post-13488926)
 * Status: not resolved