Saltar navegación

[Resuelto] How can I set up a template for a single custom taxonomy term?

This support ticket is created hace 4 años, 8 meses. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Este tema contiene 2 respuestas, tiene 3 mensajes.

Última actualización por jens-holgerH hace 4 años, 8 meses.

Asistido por: Minesh.

Autor
Mensajes
#1604137

Hi, I want to use a custom taxonomy for "brands" and added several custom fields to the taxonomy. This taxonomy is assigned to standard posts to a custom post type "company".

Now I struggle with how to set up a template/view (?) to display a taxonomy term.

In the upper part of this taxonomy term page shall be shown: the term, a custom image to the term (here: the brand logo), several other custom fields of the term like "brand story", several social media links etc.

In the lower part of the page, I want to show first a list of five current posts and then a list of the companies that are also tagged to this term.

I tried to apply the found how-tos but I was not able to understand how to "place" and design the custom fields to the custom taxonomy term.

Btw: it is currently a bit confusing as some guides refer to the old "views" and other to the new "blocks" - and in between, I get lost...

Any help?

Kind regards,
Martin

#1605113

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As I understand, you want to build a taxonomy archive where on the term archive page:
- You want to display the term name and its associated custom term fields
- then list of 5 current posts, do you mean you want to display recent 5 posts irrelevant to term assigned from default post type post?
- and last you want to list the company post.

Now, when you create a taxonomy archive, it will allow you to display all posts belong to that term.

So, once you create a taxonomy Archive from Toolset => WordPress Archives
- You can use the fields and views button to add the terms fields. Please check the following doc:
=> https://toolset.com/documentation/user-guides/custom-content/displaying-wordpress-term-fields/#displaying-term-fields-with-views-without-writing-any-code

You should add that outside the loop at Loop Editor section and within the loop, you should add the post information you want to display.

Can you please check and see if you are able to do that this first and let me know if you require further assistance.

#1936097
Screenshot 2021-02-06 125135.png

Hello. I am sorry, but unfortunately I cannot consider this request as "resolved" at all. I have exactly the same issues martinP-14 described in his request. The link offered by Minesh describes the solution with the outdated "views" way - but not with the current "blocks" way.
The problem when working with the "blocks" system is exactly the following: If you try to add taxonomy fields outside of the loop (as recommended by Minesh) the system does not offer you fields of the "Current Taxonomy Term" but of the "Current Post".
So you cannot select any of the custom fields of the given taxonomy.
This is a bug, I think. There should be no "current post" outside of the loop, because this is "current taxonomy term" area.