So I guess the question is : How do I define new page/url to which I can pass custom parameters, do a search for custom post type and pass the results to custom template for rendering?
I have made a custom post type
Apartment. Apartments have occupied dates recorded in the database and I want users to be able to search for free apartments between two dates.
I know how to do the search algorithm but I don't know what is the best way to define a new search page with custom parameters in WordPress.
And I'd also like to avoid writing the search algorithm in the template file if possible.
URL should look something like this:
- concrete example :
But it is also OK if it looks something like this as well: