Skip Navigation

[Resolved] Taxonomy custom field to a block view

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)

This topic contains 2 replies, has 1 voice.

Last updated by katjaL 4 weeks ago.

Assisted by: Minesh.

Author
Posts
#2798037

Hi,

I have this block view and I need to add a term custom field into it. The loop is constucted of a Toolset blocks and some of the details (single fields + Field and Texts etc.) are inside Kadence accordion.

SHORTCODE
The data I want to show should be the current loop item's attached custom category -> custom field.
If I try to add the Field and Text block, it is changes immediately to shortcode (!?) and it does not filter current item's taxonomy's custom field. It shows all the custom fields of this taxonomy.

The shortcode at the moment: [types termmeta='my-field' title='Check'][/types]

SINGLE FIELD
If I add Single Field block ->
1. Custom field -> (post source) Current MYPOSTTYPE -> field can't be found.
2. Taxonomy -> (post source) Current MYPOSTTYPE-> (post taxonomy) MYTAXONOMY -> I can't choose the field, they don't appear as next step.

I did also try to create a separate view and import it to the loop, but it shows all the custom fields data, not only the loop item's category's custom field data.

So, what should I do to show the custom term field?

#2798054

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Taxonomy custom fields or view is not supported with Blocks mode.

What you should do is create a taxonomy view in classic mode:
=> https://toolset.com/course-lesson/enabling-legacy-version-of-toolset-views/

Then go to Toolset => Views and and add a new view and set your view to query your desired taxonomy and within the view's loop editor section you can add the taxonomy custom fields.

More info:
=> https://toolset.com/documentation/displaying-wordpress-term-fields/#displaying-term-fields-with-views-without-writing-any-code

You can also add taxonomy term Query filter to filter the taxonomy view by the current page/post term.

#2798594

Thank you Minesh. This is excactly what I tried, but the problem is as I stated: "I did also try to create a separate view and import it to the loop, but it shows all the custom fields data, not only the loop item's category's custom field data."
To be more clear: I inserted the classic view to block view as toolset shortcode. The filtering to restrict to only current loop item didn't work, all the custom field data showed.

It seems I have to construct the whole view from beginning in classic mode? That's a scary thought...

#2798597

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please share problem URL and admin access details and let me review whats going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2798653

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you pleaes check now: hidden link

I've adjusted the taxonomy view output as given under:
=> hidden link

[types termmeta='linkki-ryhmaan' title='[wpv-taxonomy-title]'][/types]

Somehow, while editing the loop output was lost so you will have to use either post revision where you added your original loop output or use the backup.

I've added the "Shortcode" block and added the taxonomy view as given under:
- hidden link

[wpv-view name="linkki-ryhmaan"]
#2798658

Ok I restored the backup. Thank you I will dig deeper in this later.

#2798660

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - restore the backup and you just need to add "shortcode" block and add the taxonomy view at whatever place you want to display it:

[wpv-view name="linkki-ryhmaan"]
#2798669
Screenshot 2025-02-28 at 12.23.32.png

Ok, now I added the shortcode. The same problem as described before: all the data is displayed, not only the current item in loop. Attached you see the screenshot and the "Katso ryhmät" is the label and there should be only one. Now it's showing all the term field data with multiple "Katso ryhmät".

#2798678

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I tried the old admin access details you shared but its not working.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2798680

Ok probably I took the backup before creating the toolset user 🙂
Here is the new password: 7Rrm6FYnhsOXpPE(os32K5gq
user: toolset
admin hidden link

#2798682

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check now: hidden link

I've added the "Taxonomy Term" Query filter to your taxonomy view:
- hidden link

And loop output adjusted as:

[types termmeta='linkki-ryhmaan' title='[wpv-taxonomy-title]'][/types]

Can you please confirm it works as expected now.

#2798683

Yes, thank you!
(If possible please delete the url's.)