Skip Navigation

[Résolu] Trying to create custom urls from taxonomy slug

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: I would like to create a list of links based on the slug of each term assigned to a post. The wpv-post-taxonomy shortcode separator feature doesn't help.

Solution: Create a View of this taxonomy, filtered by term assigned to the current post or by term assigned to the current post in the loop. Then use the Loop editor to build each link using shortcodes and HTML, for example:

<a href="https://mysite.com/#[wpv-taxonomy-slug]">[wpv-taxonomy-title]</a>

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/

This support ticket is created Il y a 6 années. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Marqué : 

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par herreV Il y a 6 années.

Assisté par: Christian Cox.

Auteur
Publications
#1141269

Hello i'm trying to displaying category names linked to a post.

For sure the normal approach works.

But what i would like to create is a list of names that do link to a custom page url.

E.g. My post contans the following categoy values: cat1, cat2, cat3

Then i would like to create the following output:
cat1 cat2 cat3

So instead of a link to the taxonomy archive i need to create links that do link to a URL and added #category-slug

Can you please send me in the right direction... I first wanted to use the separator="" parameter but not sure how to complete this...

#1141602

Hi, you won't be able to do this type of customization with the wpv-post-taxonomy shortcode. Instead, create a View of the taxonomy, filtered by term, where the term is set by the current post or set by the current post in the loop . Then you can use the View loop to iterate over each related term and build a custom link URL using the term slug shortcode. Let me know if you have questions about that.

<a href="<em><u>lien caché</u></em>">[wpv-taxonomy-title]</a>

https://toolset.com/documentation/user-guides/views-shortcodes/

#1142354

My issue is resolved. Thank you!

Thank you Christian, that was indeed the solution... easy piecy ... I'm a bit too busy at the moment... I didn't see this easy solution myself. Thanks