-
Search Results
-
Topic: Search by geolocation
Hello!
From what I’ve seen in other forum posts, geolocation search functionality is not yet available.
We are planning to implement it ourselves, but I would like you to confirm if I could do it with the filters available in your plugin.
First of all, you would need to include a new field in the form, with a Km distance selector. With which filter could I do it? I have not seen this specifically in the documentation
Secondly, for searches I have seen that I could use a plugin like this: https://gschoppe.com/wordpress/location-searches/ that extends the WP Query class and then use your sf_edit_query_args filter to add the filter for X km away from the user’s location. Have you done any tests with this type of systems? Would it work well in conjunction with your plugin?
I await your response, thank you very much!
I have couple of issues
See this page
https://acu2020dev.wpengine.com/story
I have created a page template and added the shortcodesecho do_shortcode('[searchandfilter id="133"]'); echo do_shortcode('[searchandfilter id="133" show="results"]');
I am showing a featured post first and then I am showing the listing
As I dont want to show the featured post I added the following codefunction filter_function_name( $query_args, $sfid ) { //echo "Coming here"; //if search form ID = 225, the do something with this query if($sfid==133) { //modify $query_args here before returning it if (is_page_template('page-templates/stories.php')) { //echo "This is ".get_queried_object_id(); $featured_story = get_field("featured_story_landingpage",get_queried_object_id()); $exclude = array($featured_story->ID); $query_args['post__not_in'] = $exclude; } } return $query_args; } add_filter( 'sf_edit_query_args', 'filter_function_name', 20, 2 );
This works alright when the page is loaded, but when I click the Clear filter button or when a category is selected, the above exclusion is ignored and the featured post is shown in the listing
What am I doing wrong? or is this a bug in the plugin?
Also how can I show a numbered pagination?
regardsTopic: Relation OR in filter