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, hidden link
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 - hidden link 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 - hidden link =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 - hidden link
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: hidden link
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!
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
hidden link
hidden link
hidden link
....
2) industry category
hidden link
hidden link
hidden link
....
3) project type.
hidden link
hidden link
hidden link
....
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
My issue is resolved now. Thank you!