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 5 years, 10 months 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 5 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#1186701

Shane
Supporter

Languages: English (English )

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

Hi Kristof,

Could you send me a screenshot of exactly where the taxonomy is showing where you want it gone ?

As you say i'm not following correctly as I was under the impression that this was on a search.

Thanks,
Shane

#1186786
Screenshot-4.jpg
Screenshot-3.jpg
Screenshot-2.jpg
Screenshot-1.jpg

Hi Shane,

Maybe it's best to read my last post again. I certainly don't want the taxonomy gone.
Let me recapitulate.

First I had a Custom Fields Group "Kitchen" which contained about 20 checkboxes (fridge, oven, ...). This allowed our client to easily check/uncheck features of the kitchen. Downside was that in order to display all checked features on the frontend, there was no "show all" code.

Then I had a look at your Toolset real estate demos and saw that you use Taxonomies for these kind of features, so I created a few hierarchical Taxonomies (kitchen, living room, garden) - Screenshot-1. These are still easy to check/uncheck and our client can freely add more if required.

Now for the frontend part of this. Of course I needed a way to display the selected terms for each of the taxonomies so I created a View to query my "kitchen features" - Screenshot-2 - which looped over all terms and display the ones who aren't empty - Screenshot-3.

For a few days, I thought I had it figured out, because as a matter of test, I checked ALL terms and hooray, ALL terms displayed in the View. Except, when I unchecked a few to test further, the View still displayed ALL terms. Unfortunately I cannot find any filter to just display the selected terms. Which is an issue, as this View gave me the most possibilities to choose my sorting, separator, ...

After a few hours searching in the forum, I then found this code - which only works in a Content Template by the way - not in a View Loop

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

This gives me ALMOST the desired result - Screenshot-4 EXCEPT I cannot control the sorting, it is always alphabetically.

So what I want is - preferably - a View that displays only the selected taxonomy terms in the order I have set the terms, so I can insert that view into my Page Content Template.

#1186859

Shane
Supporter

Languages: English (English )

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

Hi Kristof,

I'm a little closer to understanding now. So your view is listing out all the taxonomies but you want it to list our the ones that are only specific to the post where the view is being displayed.

Sometimes it might take a few tries for us to be on the same page.

Looking forward to hearing from you soon.

Thanks,
Shane

#1188044

Not just the ones that are specific to the post, only the ones that are selected.

For instance, some of the Kitchen taxonomy terms are oven, freezer, dish washer. But not every house will have a dish washer in the kitchen.

If I use the normal Taxonomy View, dish washer will be visible in the loop, whether it is checked or not. I only want to display the selected terms.

#1188129

Shane
Supporter

Languages: English (English )

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

Hi Kristof,

Ok so what is needed to be done in your view is to add a query filter to it for the Taxonomy terms.

Then set the filter to display the items of the page where this view is placed. So instead of listing out all the terms it will only list the ones specific to your page.

Thanks,
Shane

#1188199
Screenshot_5.jpg

Ok, any idea which filter is exactly needed here?
Because these settings - screenshot - show ALL terms, including the ones who were NOT checked.

#1188208

Shane
Supporter

Languages: English (English )

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

Screenshot 2019-01-21 at 9.35.57 AM.png

Hi Kristof,

On the query filter you should add the Taxonomy term filter. See Screenshot

Does your post have multiple taxonomies attached? If thats the case then you will need to create view for each Taxonomy so that view can list out the individual terms.

Please let me know if this helps.

Thanks,
Shane

#1188221
Screenshot_6.jpg

Hi Shane,

Yes, each post (house) has at least 3 taxonomies attached (kitchen, living room and garden). I have already created a View for each one, that is how I started.

I have added the filter but as I had already tried this earlier, it shows, as expected, the loop as many times as there are items checked, 5 in the case for the kitchen.

#1188232

Shane
Supporter

Languages: English (English )

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

Hi Kristof,

Mind if I gain admin access to the site so that I can check on this for you ?

The private fields have been enabled for your next response.

Thanks,
Shane

#1188238

Shane
Supporter

Languages: English (English )

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

Hi Kristof,

I found the issue.

In the view you dont need to use the conditional or the wpv-post-taxonomy as this is only for when you are not using a view to display the taxonomy.

Take a look at the example in the kitchen view.
hidden link

As you can see all i'm display is the term title with the [wpv-taxonomy-title] shortcode.

No need for anything else.

Please let me know if this is ok now.

Thanks,
Shane

#1188245

You must be kidding! It's that simple?? Although I would have never guessed to add the Query Filter.
It would give you 10 out of 10, too bad it took some time to get on the same page.

Last question, now that the accompaning Content Template "Loop item in View - Kitchen" is no longer used, how do I delete that? The Content Templates overview still thinks that it is in use.

#1188246

Shane
Supporter

Languages: English (English )

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

Hi Kristof,

I should've checked the site from the get go 🙂

Also to delete the template all you need to do is to use the loop wizard and just re-do the loop and ensure that the use content template option is not checked.

I went ahead and did this for you so you should no longer be seeing the kitchen content template.

Thanks,
Shane

#1190988

My issue is resolved now. Thank you!