GEO my WP Support

Use this forum for technical support and general questions related to GEO my WP plugin and its core add-ons only. For technical support and general questions related to any of the premium extensions please open a new premium support ticket.

[Resolved]adding date search filters from post meta

Forums Support adding date search filters from post meta

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #58835

    Hi, I would like to have visible filter options for the ajax post locator, so users can filter by relative dates such as ‘tomorrow’, ‘this weekend’ etc.

    I already have the custom queries setup to achieve this –these work to filter the posts (a custom post type for events) as expected, showing posts with meta date values for the given time frame (today, tomorrow, this weekend (sat and sun).

    I see code in the forums for how to write functions to modify the search query, and how to add a new orderby parameter, but I don’t see how to do so with multiple queries, or how to attach each custom query to a form option.

    For example, I’d like to use radio buttons for each option (today, tomorrow, this weekend) and have each selection match up with the right query modification.

    I’m hoping perhaps you can point me in the direction of some existing code that will help get me closer. Thanks in advance for your time and expertise.


    Hi again, I see the code here being the closest to what I’m trying to do , but I have multiple queries.

    For example, I want to have search filters for relative dates, such as ‘today’, ‘tomorrow’, and ‘this weekend’ — I have these custom queries coded and working on their own,

    {I had the code here but it encodes basic characters (?) so I’ve now removed it}

    but I’m not sure how to attach each query to its own search filter option. Can you please point the right direction, or send a quote for creating this customization yourself?

    This reply has been marked as private.

    Hi. Modified query clauses don’t appear to be working at all.

    I would like to return only the posts that have the meta_value ‘new_dateA’ == $today , but even the orderby meta_value is not working.

    Even this code from the docs does NOT modify the query:

    Do these not work for ajax forms, or what is the issue?

    I’m really having trouble finding code examples in the docs or forums that actually work, from which to build on. It’s impossible to tell which are outdated or only apply to form results that load on a new page.


    Hello @earlygroove,

    I apologize for not replying sooner. Since you have a premium extension, please use its license key to open a premium support ticket ( I believe you have done so before ) for any questions or issues you might have and I will reply in a timely matter.

    Regarding your question, I haven’t inspected the code in details yet, but if you are using a Posts Locator AJAX form, then ‘gmw_pt_location_query_clauses is not the right filter. Please try the filter ‘gmw_ajaxfmspt_posts_query_clauses’ instead and see if it works.

    Let me know how it goes.


    I also tried modifying the search query to see if gmw_pt_search_query_args works as expected, but whether I do the query args like

    or if I use the format

    this does not modify the search query.

    Nor does modifying the meta_query

    To be clear, my end goal is not to modify the search query without triggering it within a select box –just thought I’d try modifying the query straight out since modifying the clauses was not working.


    I just saw your response. Changing the filter for the documentation code still doesn’t affect the search results

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘adding date search filters from post meta’ is closed to new replies.