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 ?
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
I'm going to try this thank you!
OK, please let me know if you still need assistance for it. thanks