Skip Navigation

[Gelöst] Show custom taxonomy fields in page with a view with url paramter

This support ticket is created vor 7 Jahren. 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

Dieses Thema enthält 18 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Luo Yang vor 6 Jahren, 11 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#591017

Hi

I have a page that lists taxonomies: versteckter Link
I have a page that list child taxonomies of parent clicked taxonomy: versteckter Link

My taxonomies have custom fields. One of that custom fields is contenido

Is it possible to list in page that list list child taxonomies of parent clicked taxonomy one text fild tht shows contenido of parent clicked taxonomy?

Example

I click in Aislamiento -> goes to page that list aislamiento child taxonomies + at the bottom page i have a textfield with contnido (text) of parent taxonomy aislamiento. I don't know if is it possible that field (not view) shows content depending of the url parametr tipo

#591116

Dear David,

In the URL:
versteckter Link
There is an URL parameter "tipo", the value 2, If it is the parent term's ID, then you can create a view, list terms of your custom taxonomy, filter with:
Taxonomy term ID is set by the URL parameter "tipo"

It will be able to query the specific term(ID 2).

#593575

Hi. It is not correct the explanation of my problem.

I need to show a field term in archive page of custom post type of child taxonomy.

Example: versteckter Link. Here I how custom post types of that taxonomy, and plus I need to show a field called contenido-tipo-de-producto with the content of taxonomy fibras-de-madera.

The problems are:

How can I insert this field in archive page?
How can I show the content of that field of taxonomy in archives page that list custom post types of that taxonomy?

#593590
Captura de pantalla 2017-11-27 a las 19.28.19.png

Like as attached screenshot

#593718

Q1) How can I insert this field in archive page?
You can setup a wordpress archive for the archive page, then you will be able to insert any Views shortcode into the content, see our document:
WordPress Archive – Customizing the Appearance of Archive Pages
https://toolset.com/documentation/user-guides/normal-vs-archive-views/

Q2) How can I show the content of that field of taxonomy in archives page that list custom post types of that taxonomy?
I assume we are talking about the term archive page, you can get the term's ID with shortcode:
[wpv-taxonomy-archive info="id"]
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-taxonomy-archive

With the term's ID, you can get it's term's field value, for example:
[types field="my-singlelinetext" term_id="[wpv-taxonomy-archive info="id"]"][/types]
https://toolset.com/documentation/customizing-sites-using-php/functions/#textfield
click link "Repeater attributes, User attributes, Term attributes, Usage examples"
term_id:
"id" - output the field for the term with this id.

#594460

Hi Luo

q1. It's OK but I need to add more content than only list in grid custom post types. How can add a txt field outside the loop output, or a button or image....
q2. We're talking about custom post types archive page, not term archive page. In custom post types archives page i haven't the button to edit this template. The divi button only allow me to edit the content of custom post type (detail) not archive page. I want to add content of term cutom post type in custom post type archives page (q1). Where i must insert this shortcode [wpv-taxonomy-archive info="id"] to get the id of term in custom post type archive page of that term

Thanks!

#594567

There are lots of new questions in this thread, and I am trying to answer them one by one:
Q1) How can add a txt field outside the loop output, or a button or image....
Why do you want to display a text field outside the loop output?
What kind of fields do you want to display? custom post field or custom taxonomy field?
I suggest you follow our document to setup the loop of view:
https://toolset.com/documentation/user-guides/digging-into-view-outputs/
If you still need assistance for it, please create new thread for the new question

Q2) In the custom post types archive page, the shortcode [wpv-taxonomy-archive info="id"] won't be able to work, it works only in taxonomy archive page.
Why do you want to display a taxonomy field in the custom post types archive page?
Is there any relationship between the custom taxonomy and the custom post type?
And it is different from your original question:
https://toolset.com/forums/topic/show-custom-taxonomy-fields-in-page-with-a-view-with-url-paramter/#post-591017
Which is talking about getting taxonomy field with an URL parameter.
And I have provided you a workaround in post:
https://toolset.com/forums/topic/show-custom-taxonomy-fields-in-page-with-a-view-with-url-paramter/#post-591116

#594853

Hi again Luo

I don't explained my problem right. Sorry

I need the following

I have custom post types -> Products
I have custom post types terms -> Category and subcategories products

Page 1 list categories -> I have this working right
Page 2 list subcategories of clicked category -> I have this working right.
Page 3 (archive page of custom post types) list products of clicked subcategory, and a text with a description of clicked subcategory -> I have grid of products working right but I need only one text field that list description of clicked subcategory.

Is it possible to get this? I don't find the way to get this

Thanks

#594956

Thanks for the details,

In the Page 2 list subcategories of clicked category,
You can setup the link with URL parameter term-id, pass the subcategory's ID to the target page,
in the target page: Page 3 (archive page of custom post types) list products of clicked subcategory
create a view, list terms of your custom taxonomy, filter with:
Taxonomy term ID is set by the URL parameter
And display the custom taxonomy fields

#595809

Hi Luo. I'll test this afternoon.
Thanks!

#595854

OK, please update this thread if you still need assistance.

#596348

Hi Luo

I can't get list products now.

I list term of taxonomy but not products. I'm not using archives page because I can't insert anything there, only custom post types. I created a new page, and I put a view to list products but don't list anything. The view of taxonomy term works fine. How must i configure the view to list products of category with url parameter?

#596355

I configured the view to list custom post types with
-> include entries with IDs determined by the URL parameter "tipo"

#596555

For the new question:
How must i configure the view to list products of category with url parameter?

Please follow our document to setup the taxonomy filter:
https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/
Taxonomy setting: Value set by URL parameter

#596887

Hi again Luo

I'm configured the view following the instructions, but it doesn't list productos of child taxonomy.

I don't know what is the problem

Tipos producto slug en uno de lo definido por el parámetro de URL tipo
p. ej., versteckter Link.

I tried the other options but i haven't results of products too
Tipos producto slug en todo de lo definido por el parámetro de URL tipo
p. ej., versteckter Link

No results found. Taxonomy field working right. Custom post types of that taxonomy without results.

Can you help me?

Thanks a lot for your help.