Skip Navigation

[Resolved] Customs fields of post / product outputs 3 times

This support ticket is created 6 years, 4 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

This topic contains 3 replies, has 2 voices.

Last updated by Beda 6 years, 4 months ago.

Assisted by: Beda.

Author
Posts
#924622
2018-07-13 11_45_14-CH-71 BBB CH.png

I'm trying to show customs fields on the frontend product page, but the customs fields are outputted 3 times. I don't know where that comes from.

#924999

I get ERROR: Wrong login or password

Please can you link us with the Problem URL, the Backend Posts, Fields and other Views, or Content Templates involved and check the log in data?

Can you as well confirm that this issue is not due to any duplication or triplication of the ShortCodes in the Content Templates or Posts where you insert them?
I would as well like to clarify if this happens with all fields, and since when.

If you cannot find any hint or resolution with above steps, please as well adda copy of your site too the answer.
https://toolset.com/faq/provide-supporters-copy-site/

#935159
#948224

It seems to work correctly when I insert the customs fields directly in the view of the product page (Template: Produkte), but not when I create a new view (View: technische-daten) which I call in the product template (Template: Produkte).

I would much rather like to create the additional view and call it in the product template with a single shortcode. But that creates the problem that every field is shown multiple times.

#948951

Well, a View will loop over posts, so it's expected to get a Field output more than once, if there is more than one post with such a field in the Database.
==> It seems like the fields are outputtet for each product that the shop has (which is 3).

This is correct, in a View that is what we want.
In a Content Template instead, we style single things so there we output it once.

Read the main difference here:
https://toolset.com/faq/whats-the-difference-between-a-view-and-a-view-template/

If you want a View, you can do that too and limit it to one result only, but that is not the idea of Views.

Imagine WordPress's Loop (many Posts) and Single Posts.
That is the difference of Views, and Content Templates.

Views are loops (hence lists of any content) and Content Templates are usually for Single Posts (hence, they will display their things applied to ONE item a time)

I hope that is the source of the confusion, which would make it easy to solve.
If you followed this logic already and the fields are still output many times unexpectedly please let me know.