CHALLENGE: Can you create a post grid that uses one or more meta fields as selectors instead of taxonomies?

[ad_1]

I have been looking for weeks for a solution to this problem and I have yet to find out how to do this.

I have a simple site with ACF Pro that is used to store vacation homes for rent. What I need to be able to do is to search for and create a Grid of the properties. Normally this would be done using some sort of taxonomy. But, in this case I only have the property\_id for each rental that should be shown.

The property\_id field is a field that is unique to each rental that identifies the property. It is in a meta field. But, since any combination of rentals may be returned as an array of property\_ids, there is no way to create a taxonomy of every possible combination of property\_ids.

I need to be able to show a grid using an array of property\_ids as the selector for which properties will be shown in the grid.

Is there any way to do this?

I am about to try looking for a hook (filter) to see if it would be possible to intercept a query that would return ALL rentals and change that to only the rentals in the property\_id array before the grid is displayed. I have no idea about hooks, so I may or may not be successful.

[ad_2]

 

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