Skip Navigation

[Gelöst] display distinct values of custom field in a view

This support ticket is created vor 7 Jahren, 2 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Beda vor 7 Jahren, 2 Monaten.

Assistiert von: Beda.

Author
Artikel
#559093

I am trying to: display only distinct values in a view

Link to a page where the issue can be seen: versteckter Link

now display : tv,tv,product2,rentcar,tv
But I'd like to display different values ( "tv" is repeated three times. )

I expected to see: tv , product2 , rentcar, car

Insoo

#559144

I assume this is a View that queries a certain Post Type, to where a certain Field with values TV, product, and so on, is assigned.

The View will produce a loop, and in that loop, all posts will be rendered.
For each Post, all the fields you call by ShortCodes will also be rendered.
Hence, it is the correct output.

If you want to show each field only once, despite how many posts there are in the Loop, you do not have to use a Loop.
You can either display the Post Fields outside the Loop (just above or below the <wpv-loop> tags) or, you can fully neglect to use a View.