I am trying to: Filter results based on a custom field (Bedrooms, Bathrooms, Living, Cars) which are located in the Designs CPT.
Link to a page where the issue can be seen: hidden link
I expected to see: A select drop-down showing the room numbers being displayed the search results currently being displayed in a basic output using [types field='bedrooms' item='@home-design_house-and-land.parent'][/types]
Instead, I got: A blank select box.
Hello,
Thanks for the details, I can login into your website and see the problem.
Please check the custom field group "Home_Design - Rooms" setting here:
hidden link
Those custom fields (Bedrooms, Bathrooms, Living, Cars) are registered to Post Type "Home Designs".
But the post view "Parametric_Search_House_Land View" is querying posts of another post type "House_Land Packages", since there isn't custom fields (Bedrooms, Bathrooms, Living, Cars) in "House_Land Packages" posts, so it conducts the problem you mentioned above: A blank select box.
It is a limitation of WordPress PHP Class WP_Query: if you are going to filter posts a custom post type by custom fields, those custom fields should be setup in this custom post type, you can not filter the result by custom fields of another post type.
So you might consider to move field group "Home_Design - Rooms" to post type "House_Land Packages", edit each "House_Land Packages" post, and setup those custom fields values.
The goal desire is to save on data entry by connecting the designs to the packages so the lack of that ability is a bit of a pain - can it be achieved with custom php? Any suggested experts who could achieve it?
It should be possible with custom PHP codes. and nothing is impossible with custom codes, you can check it with our Toolset Contractors:
https://toolset.com/contractors/
You can also add a feature request for it:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
Our developers will evaluate it.
There now seems to be a "Bug" with my View (Parametric_Search_House_Land View)
When displaying only the results, it is adding an old edition of the search filters at the top and becoming unresponsive?
hidden link
You can see both the "filters" being out put when the bottom should only be showing the results.
[wpv-view name="my-landy" view_display="layout" cached="off"]
Assistance with this issue available?
I have rebuilt the view, page. It's now possible to use the "search / filters" once - only via submit button action, not via "AJAX" and it only works once, after that it no longer functions.
My issue is resolved now. Thank you!
blah