Display Listings from Region on regular WordPress Page

Not sure if this is even doable, but our SEO guy wants to create Landing Pages for variousc cities outside of the regular listing pages for certain Top 25 cities. So displaying listings on a standard page. I know I can place a listing block on a standard page but is there some way to set it up where it pulls listings let’s say 25 miles away from a specific spot?

Sorry, there’s no such feature yet, but we plan to add more filters to the Listing block settings, including the region filter. If you have a developer this may still be possible with customizations, e.g. by filtering the listing query via the “pre_get_posts” filter on this page.

But how does your filter work? We’d like to use the Geolocation / Long-Lat model to get this to work. Where do we see this in the code?

The filter searches listings based on latitude/longitude if the exact address is searched (within a radius of the entered address), if the region is searched (e.g. district, city, county, state, country) then listings are searched by region (it’s a hp_listing_region taxonomy) and coordinates are ignored. You can check the Geolocation source code here hivepress-geolocation/class-geolocation.php at master · hivepress/hivepress-geolocation · GitHub

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.