Passer la navigation

[Résolu] How to create a taxonomy archive page for each user?

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

Fuseau horaire du supporter : Asia/Karachi (GMT+05:00)

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

Dernière mise à jour par himanshuS Il y a 4 années et 4 mois.

Assisté par: Waqar.

Auteur
Publications
#1966955

I am using a custom taxonomy called skill-category across multiple CPTs. I am also using a custom post type called "portfolio" to act as a user profile post i.e. there is only one portfolio post per user and I use it to show user activity on the site.

For example, lien caché

This link is unique for each user and allows me to show them all the info related to just that user. Now I want to drill even deeper into user information. The above link shows the user's performance and engagement across all "skills" on a portfolio CPT.
But, I want to be able to click on any skill shown on the portfolio CPT and directed to the user's performance for that skill. I am thinking of 3 possible ways to do this -
1. Create a search page such as - lien caché that allows others to select a skill and only see data related to that skill.
2. Pass skill taxonomy as a URL param and use it to modify the output on the portfolio post - lien caché =market-analysis. That does not feel like the cleanest solution
3). Somehow create a taxonomy archive for each user and just link to it. Something like - lien caché

I think the 3rd one is the cleanest one and most intuitive for the user to understand but I am not sure how to do that because the number of taxonomy terms will keep on changing over time so I don't want to manually create a sub-post for portfolio post every time a new taxonomy term is created.

I am still working on making the portfolio taxonomy work but a rough idea of how the portfolio post would look like: lien caché

You will notice here that I am using 3 custom taxonomies: 1) skill category, 2) industry category, 3) project type. Ideally, I would like to have unique information per user for each term for all 3 custom taxonomies but let us start with skill-category taxonomy. Thank you for your help!

#1967805

Hi,

Thank you for contacting us and I'd be happy to assist.

Based on the information you've shared, I agree that option 2 is the simplest while option 3 is the cleanest yet more challenging as it will require some extra customization work.

But for option 3, I won't use the term taxonomy archive. You'll need 3 "custom endpoints" for each of those taxonomies.

For example:

1) skill category
lien caché
lien caché
lien caché
....

2) industry category

lien caché
lien caché
lien caché
....

3) project type.

lien caché
lien caché
lien caché
....

So in summary, you'll add three endpoints "skill-category", "industry-category" & "project-type" that will allow you to process and show data related to their term slug values accordingly.

Here are some useful guides on using the Rewrite endpoints API:

https://developer.wordpress.org/reference/functions/add_rewrite_endpoint/
https://make.wordpress.org/plugins/2012/06/07/rewrite-endpoints-api/
https://stackoverflow.com/questions/26072925/add-rewrite-rule-for-custom-sub-pages

regards,
Waqar

#1969313

My issue is resolved now. Thank you!