Hello,
I am building a custom AJAX filter for my listings page, as plugins did not cut it for me (haven’t tried FacetWP yet) and the official release for this feature seems to not happen too soon.
In my PHP AJAX handler, I have a custom WP_Query loop that successfully gets the correct filtered listings. Inside the while ( $query->have_posts() ) loop, after running the_post(), what is the correct HivePress function or method to render the standard listing block/card for the current post?
I have tried hivepress()->template->get_part( 'listing/view/listing-view-block' ) and hivepress()->template->render( 'listing/view/listing-view-block', ... ) but both cause a fatal “Call to undefined method” error, so would need to know what is the right function name.
Or, if this approach is wrong, please correct me. Will share the whole script if I manage to solve this issue and make it work. I guess it would help a lot of people as there are many requests for Ajax filtering.
Thank you!