Modify Lat/Long Value based on Conditions using Hook

Tagged:
  • 10 months, 1 week ago #33148

    Hi, we have some conditions, and based on those conditions, I need to get the values from a function/code, which I need to pass as lat and long to search, Instead of the indexed acf geolocation field value? Can you help me with the hook ?

    Also, if I have a post which should work with multiple Lat/Long, what is the process to do it, Suppose a post should come on top for 3 Lat/Longs values.

    wpsolr
    Keymaster
    10 months, 1 week ago #33156

    I need to pass as lat and long to search, Instead of the indexed acf geolocation field value? Can you help me with the hook ?

    You can use the hook WPSOLR_Events::WPSOLR_FILTER_POST_CUSTOM_FIELDS to fill your custom field with your own lat,long values. An example can be found in file wpsolr-pro/wpsolr/pro/extensions/woocommerce/class-wpsolr-plugin-woocommerce.php

    Suppose a post should come on top for 3 Lat/Longs values

    I’m not sure it is possible to have an array of lat,long values in an indexed field.

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

You must be logged in to reply to this topic.