Hello Carlo,
Thank you for the feedback, and I apologize for the delayed reply.
I haven’t tried this myself, but since GEO my WP uses the WP_Query to display the results, you might be able to use it with the Search & Filter plugin.
GEO my WP has the filter :
apply_filters( 'gmw_pt_search_query_args', $query_args, $form );
Which allows you to modify the WP_Query arguments. You should be able to use this filter to pass the filter ID ( $args[‘search_filter_id’] = 123; ) to the query_args as described in the documentation.
Let me know if this helps.
Thread Starter
CharlieF
(@carlofischetti)
Hello Eyal,
thank you so much for the response. I’m glad to know that.
I have used [the show_results_shortcode] by S&F in your “content.php” in place of result (<div id=single-post>) that i have transferred by pasting it in S&F results.php template.
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
But the issue is that when the Geo My Wp results are passed through the Search & Filter template, (called “results.php”) they looses some properties and if GMWP form find 1 product nearby, it shows all products presents in the store without distance difference. Also, if doesn’t find products nearby, all works fine with the correct message shown.
This because i think that in the result.php template by Search & Filter, the code starts with “if ( $query->have_posts()” while in your “content.php” the code starts with “if $gmw_form->has_locations()”.
How can i combine this, or, if using your GEO My Wp filter with S&F custom option insted of shortcode one, where can i declare that and in which way?
Thank you so much, i wish in this way we can open new ways to use GMWP.
Carlo
Thread Starter
CharlieF
(@carlofischetti)
Or, how can i register the GMWP results as Custom post types? I’m thinkin to resolve by several scenarios. Thanks Eyal 🙂