Title: Modify search query
Last modified: August 31, 2016

---

# Modify search query

 *  Resolved [Meet Shah](https://wordpress.org/support/users/meet1347/)
 * (@meet1347)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/modify-search-query/)
 * Hi,
 * Actually I am using this plugin as Place + Event and I have added a custom field
   for event date and I am sorting posts according to event date that are current
   or upcoming. I have created custom query for that and that is working fine. I
   want to integrate that meta query for the search result as well as the search
   widget on top works on all post generally which I want to change and I want to
   search from the posts that are yet to come according to my custom field.
 * How can I add that extra query for search widget, please help.
    Thank you in 
   advance.
 * [https://wordpress.org/plugins/geodirectory/](https://wordpress.org/plugins/geodirectory/)

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

 *  Plugin Author [Paolo](https://wordpress.org/support/users/paoltaia/)
 * (@paoltaia)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/modify-search-query/#post-7319477)
 * Hi,
 * this is the support forum of the core plugin only. If you have add-ons installed
   like it seems, please request for support in our support forum here: [https://wpgeodirectory.com/support](https://wpgeodirectory.com/support)
 * Thanks
 *  Thread Starter [Meet Shah](https://wordpress.org/support/users/meet1347/)
 * (@meet1347)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/modify-search-query/#post-7319501)
 * Hey Paolo, thanks for the reply.
    I installed an add-on but that is for importing
   snazzymap designs.
 * I want to add a meta query with the default search query of GD Search widget.
   So can you please let me know the responsible file for GD Search widhet ?
 * Thank you in advance.
 *  Plugin Author [Stiofan](https://wordpress.org/support/users/stiofansisland/)
 * (@stiofansisland)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/modify-search-query/#post-7319540)
 * Hi,
 * I am not sure why you added a custom field for event date when events addon has
   this already? I am also not sure if you mean you added a GD custom field or a
   meta value? We use the standard WP queries and hook into and edit them. If i 
   understood more what you are trying to do i might be able to help more 🙂
 * Thanks,
 * Stiofan
 *  Thread Starter [Meet Shah](https://wordpress.org/support/users/meet1347/)
 * (@meet1347)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/modify-search-query/#post-7319550)
 * Hey Stiofan,
 * My client doesn’t want to spend $45 on an add on and we have purchase snazzy 
   map add on already.
 * Well, we just have to sort posts from gd_place post type on the custom field 
   of date (added through ACF plugin). So the posts suppose to be sorted on that
   custom date and not on published date.
 * I have created meta query for this already but I do not know where to add this
   so I can get sorted day. It will work in a way like, today is 29th April so the
   search will not consider posts which have custom date older than 29th April.
 * I hope this will give you a better idea.
 * Thank you.
 *  Thread Starter [Meet Shah](https://wordpress.org/support/users/meet1347/)
 * (@meet1347)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/modify-search-query/#post-7319551)
 * By the way,
    [https://goo.gl/hPcPfq](https://goo.gl/hPcPfq)
 * this may help you to understand…
 * I just have to implement this login in search query. So the search widget of 
   the plugin will have to search on limited posts only.
 *  Plugin Author [Stiofan](https://wordpress.org/support/users/stiofansisland/)
 * (@stiofansisland)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/modify-search-query/#post-7319554)
 * This goes beyond the scope of support, this is custom development which we don’t
   do. I would suggest if you want to do things this way that you use our hooks 
   to disable all our query edits for that post type and then figure out how to 
   do it with ACF and your meta info.
 * Thanks,
 * Stiofan

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

The topic ‘Modify search query’ is closed to new replies.

 * ![](https://ps.w.org/geodirectory/assets/icon-256x256.jpg?rev=2778361)
 * [GeoDirectory - WP Business Directory Plugin and Classified Listings Directory](https://wordpress.org/plugins/geodirectory/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/geodirectory/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/geodirectory/)
 * [Active Topics](https://wordpress.org/support/plugin/geodirectory/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/geodirectory/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/geodirectory/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Stiofan](https://wordpress.org/support/users/stiofansisland/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/modify-search-query/#post-7319554)
 * Status: resolved