Skip Navigation

[Résolu] Redirect a taxonomy to a static WordPress page…

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.

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

Problem: I have placed a taxonomy link in my Content Template using the wpv-post-taxonomy shortcode. Instead of linking to the term archive page, I would like to link to a static page that has the same name and slug.

Solution:
Use the wpv-post-taxonomy shortcode to construct a link to the page like this:

<a href="http://yoursite.com/[wpv-post-taxonomy type='autor' format='slug']">[wpv-post-taxonomy type="autor" format="name"]</a>

Relevant Documentation: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-taxonomy

This support ticket is created Il y a 7 années et 3 mois. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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)

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

Dernière mise à jour par Javier Félix Hernández Márquez Il y a 7 années et 3 mois.

Assisté par: Christian Cox.

Auteur
Publications
#560401
static-page-that-I-want-to-show.jpg
scrrenshot.jpg
page-that-currently-opens.jpg

Tell us what you are trying to do?
I would like to open a static page when a user or visitor clicks on the author taxonomy instead of opening the self-generated page by WordPress.

Is there any documentation that you are following?
Yes, I read a lot of helper docs and see videos like this: lien caché but I can not solve my question.

What is the link to your site?
The site is still in testing. The link is lien caché
The link to static page is: lien caché
The link to taxomomy self-generated is: lien caché

Description
I have created the taxonomies with Toolset Types. Then I created the static pages for each author with the Elementor plugin. Now it is possible to use these static pages and to be displayed when the user clicks on the taxonomy, in each product of the store? Or I have to create new sections again using the Views plugin?
Thanks you very much in advance!
Best regards,

#560483

Hi, how is the taxonomy term link Harald Braem added to the page here?
lien caché

Is this link part of a Content Template you created in Views, or is this link automatically added by your theme?

If it is part of a Content Template, you can make the links point anywhere you want. I can help you with this. If it's automatically added by your theme, then you'll need to check with your theme authors or support team to see if it is possible to modify them. I'm not a good source of help for custom themes, unfortunately.

Please let me know how you would like to proceed. If this is part of a Content Template, please share a screenshot of the Content Template in your wp-admin area so I can see how you have added the taxonomy term link.

#560510
screenshot-views.jpg

Hi,

Yes, the taxonomy term link is part of a Content Template I have created in Views:

[wpv-post-taxonomy type="autor"]

You can see the attached image.

Thank you very much again!

#560559

Okay I see, thanks! Now, you need to figure out how to link to each custom page instead of the taxonomy term. If your custom page slugs all match your taxonomy term slugs, this is very straightforward. For example, if your taxonomy term Harald Braem has a slug "harald-braem", and your custom page for Harald Braem also has a slug "harald-braem", go to #1. If not, go to #2.

1. Replace your wpv-post-taxonomy shortcode with a link to that taxonomy term slug using the taxonomy term name:

<a href="<em><u>lien caché</u></em> type='autor' format='slug']">[wpv-post-taxonomy type="autor" format="name"]</a>

I recommend this approach, even if you have to go back and modify some slugs in your pages and terms to make this work. More information about formatting the wpv-post-taxonomy shortcode output here:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-taxonomy

2. If the slugs for your pages and taxonomy terms are not identical, then things are more complex, because there is no link between the taxonomy term and the author page. You must combine a taxonomy View and taxonomy term custom fields in order to make this work. Let me know if this is how you want to proceed instead of the matching slug route, and why.

#560687

Hi Christian,

Excellent!

Finally as the slug of the custom page match the slug of taxonomy, I was able to solve my problem thanks to the first solution that you have given me.

Thank you very much again!

Best regards,

Le forum ‘Types Community Support’ est fermé à de nouveaux sujets et réponses.