Skip Navigation

[Resolved] display all fields in a group

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted display their taxonomies on a post using a view.

Solution:

All you need to do is to create a view that is listing out the taxonomies.

Then you just add a filter to that view for the Taxonomy Term then set that filter to display based on the area the view is displayed.

This support ticket is created 6 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 27 replies, has 2 voices.

Last updated by kristofG 6 years ago.

Assisted by: Shane.

Author
Posts
#1183718

i am referring to this old thread. Is this already possible in 2019?
https://toolset.com/forums/topic/display-all-items-in-custom-field-group/

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.

#1183733

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kristof,

In other words you want to list out each field group on a post correct?

To confirm you are using a repeatable field group ? If so then you can do this with our views .

Take a look at the documentation below
https://toolset.com/2018/07/how-to-add-repeatable-field-groups-to-your-custom-post-types/

Particularly the section about "Displaying our repeatable field group on the front-end"

Please let me know if this helps.

Thanks,
Shane

#1183739

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.

#1183748

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kristof,

Yes I see what you mean now.

Actually no this is not possible to do at all.

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.

Thanks,
Shane

#1183755

OK, I was fearing this, however I would have guessed that a missing feature might have been added in the last 4 years.

What about the taxonomies route I was thinking of. Would this better suit my real estate amenities?

#1183758

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kristof,

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.

Thanks,
Shane

#1184082

Hi Shane,

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?

#1184208

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kristof,

Yes taxonomies can have custom fields 🙂

Also yes there are real estate sites built with toolset.

Here is an example
https://discover-wp.com/site-types/bootstrap-estate-layouts/

You can also create a copy of this site where you can go in to see ho its setup exactly.

Thanks,
Shane

#1185784

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.

#1186044

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?

#1186061

I have found this code in the forum

[wpv-conditional if="( '[wpv-post-taxonomy type='keuken-voorziening' format='slug']' ne '' )"]
[wpv-post-taxonomy separator=" - " format="name" type="keuken-voorziening"]
[/wpv-conditional]

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.

#1186116

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kristof,

So on the filter you only want to display the taxonomies that will return a value in the search correct?

#1186146
Screenshot_3.jpg

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.

#1186195

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kristof,

To remove the taxonomies that are not being used in the filter all you need to do is follow the instructions in the link below.
https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/#dependent-parametric-search

Thanks,
Shane

#1186203

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.