How to show custom posts in a loop by field value returned from an API endpoint?

This is a rental website that uses an online Property Management System for storing all of their data about the rental homes. The PMS does a lot more than just that though. It also handles posting their rentals on sites like VRBO, Airbnb, [Booking.com](https://Booking.com), etc..

As such, it holds and synchronizes the availability charts between all of the rental sites. The PMS also exposes an API endpoint that you can send variables like # of occupants, begin date, end date, and more, and the endpoint will return a list of available properties by Property\_ID. The search results from the endpoint look like this….

[search return](https://preview.redd.it/wc8hriqjwlnb1.jpg?width=745&format=pjpg&auto=webp&s=93bbfb369f93cd56717a66378705fd83f0a7d9ef)

Normally you can use taxonomies to search and display loops of results in cards similar to this search on a demo site that shows cards for services….

​

[services cards](https://preview.redd.it/n5ic1y44ylnb1.jpg?width=816&format=pjpg&auto=webp&s=353202b50679bee8a59917e678c40286d4b51001)

How would I use their search results to display something similar on this WordPress site? It’s odd for me because the search is done by the endpoint, but the display needs to be done on the WordPress site so nothing like JetEngine or any of the booking plugins that I have researched seem to be relevant.

1 Comment
  1. I do something similar for real estate clients. Pseudo code: where post_type => ‘blah’ and your meta field for propertyID => array([property id list])

    This assumes you have the same post ids in your database. Presumably you are syncing the properties? But that then begs the question, why search via the third party platform?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer