I am building a real estate website and for each house I have different Post Field Groups (kitchen, living room, garden) with each between 10 and 30 checkboxes.
I want to output each Post Field Group in a list, but at the moment it looks like I have to enter each individual Post Field in the Content Template/View. This is very time consuming. Can I just output all checked fields in 1 go?
As I am writing this, I am thinking. Should I better create a taxonomy per kitchen, living room, garden? Taxonomies are global across Custom Post Types and I think they can be output in 1 go, as a list.
Hi Shane,
I want to list all (checked) fields inside a Field Group.
However, I am not using Repeatable Fields.
Let me further explain.
A house has a lot of amenities which I have divided into 3 Groups (Kitchen, Living Room, Garden). The Kitchen group for example has a lot of Checkbox Fields, like Oven, Freezer, Hub, Coffee machine, Dish washer, juicer, ... The Living Room has checkboxes for Airco, Stereo, TV, ...
I want to quickly display all checked kitchen amenities for a CPT House. This not only saves time over manually adding 30 Fields, it is also future proof when we later add extra fields. In the current case we would need to edit both the Field Group and the accompanying View.
As I mentioned at the end of my initial post, I think it is possible to display all Taxonomies in a list, I am wondering if the same can be done for a Field Group.
Since there is nothing that can identify the field as belonging to a conditional group then you will need to list out all the fields in the order in which you want it.
Your taxonomy suggestion might not work as well however it should be noted that a field isnt assigned to a specific taxonomy term but rather generic to the entire taxonomy group. Also how would the users update the taxonomy's custom fields ?
This is the problem that we will be facing if we choose to use the taxonomies and have each term have a set of custom fields.
I didn't even know taxonomies could have custom fields. I was just thinking about the plain, default WordPress taxonomies.
Are there examples of real estate sites built with Toolset? How were the amenities set up there? Post Fields or Taxonomies?
I have taken a look at the demo site and it looks like all properties are set with Taxonomies so that is what I also tried and it seems to work well. We can now list all taxonomies in 1 go in 1 View and Taxonomies are easy to check/uncheck for our client and also they can add new Taxonomies without us needing to edit the Views.
Hi,
unfortunately, we just noticed that the View displays ALL taxonomies, not just the checked ones. Also, there is no option to filter the View to only show the checked taxonomies. How do we do that?
However, it cannot be inserted into a View as it loops through that code the total amount of available taxonomy terms. So although it displays the 2 selected terms, it displays them 10 times.
I have now inserted the same code into the Content Template and it displays only those 2 terms, which is cool, however, we now lose the html list as the wpv-post-taxonomy is 1 undivided piece of code.
First I thought that the Taxonomy View worked because as a test, I have checked all terms, however, after unchecking a few, I noticed that the View simply showed ALL terms, not just the checked ones.
I then found a solution in the forum and this is what shows now. Have a look at the screenshot. It looks ok, however, it is no longer an unordened list (which is not that big of a deal), BUT the [wpv-post-taxonomy] can only be ordered alphabetically, which is an issue as we have more and less important terms so we would like a specific order, this is, the one we set with the Taxonomy Order plugin.
I am afraid you took another turn somewhere. I am not taking about Search. I am working with a View here. View the checked taxonomy terms for a specific post.