Skip Navigation

[Resolved] Termmeta shortcode

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

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)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 3 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#1731799

Hi, i would to create a Termmeta shortcode to show a field from a specific slug

I have a multiple taxonomy page
1° Taxonomy = Eventi
2° Taxonomy = Citta

hidden link

Citta Taxonomy has a custom meta field named "descrizione-eventi-citta" and i want to show it in a shortcode.
The shortcode should be something like
[show-descrizione-eventi-citta]
It should take the ?citta paramater from the url to pass it to the shortcode as a slug

Can you help me with the type api ?

#1732749

Hello,

It does not need custom codes, you can try with a taxonomy view, for example:
1) Create a taxonomy view "my-view":
- Query Citta terms
- Filter by:
Filter by a search term set by the View shortcode attribute: search. eg. [wpv-view name="view-name" search="search term"]
- In view's loop, display the taxonomy field "descrizione-eventi-citta" shortcode

2) Edit the page you mentioned above:
hidden link

You can get the URL parameter "citta" value with shortcode:
[wpv-search-term param="citta"]
Pass it to above taxonomy view as shortcode attribute, like this:
[wpv-view name="my-view" search='[wpv-search-term param="citta"]']
Then you will get related term's field in front-end

#1737261

I'm going to try this thank you!

#1737299

OK, please let me know if you still need assistance for it. thanks

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.