I'm testing to see if Types + Views can be a good solution for a request of a customer of mine. He has an enormous set of (pdf) files, articles and products that need to be displayed in a clickable index.
I've created two custom taxonomies: Names & Subjects. Both are tied to posts, pages and WooCommerce products. Both are setup with all standard options, so they basically function as input fields for tags.
I then used views to setup two new views: a list of names and a list of subjects. Both views are very simple lists of the 'tags' with links to the taxonomy. This is exactly what I require.
It goes wrong when I click into one of the names or subjects: WooCommerce starts intervening because the taxonomy is connected to 'products'. The end result: regular posts are not displayed, causing empty taxonomies even though they shouldn't be empty. Taxonomies that feature both products and posts, only display products.
The entire reason behind this exercise is to create some sort of comprehensive index that binds these different types of items together. So I really need to get 'names' and 'subjects' to display products, posts and pages in harmony.
Who has the golden tip to get this setup properly?
The examples in question can be found here:
hidden link
hidden link
Example: 'world view' currently contains posts, yet WooCommerce is causing it to display 'no products found'. One of the posts in 'world view' is: hidden link
It looks like you will need to use a filter for modifying the archive query to suit your needs.
Do you want to share access so I can see what query is being made and what changes it requires?
I have set the next reply as a private one, so you can fill in your private details.
Thanks
Caridad
As far as I can see, as soon as WooCommerce detects that the taxonomy is related with products, it applies its own filters. These filters are adding the woocommerce visibitility restrictions, which arent present in posts and pages.
Instead of using the WordPress archive, you could create a View to lists posts associated with a term, this way woocommerce wont interfere.
https://toolset.com/documentation/user-guides/filtering-posts-by-user-selected-taxonomy/
Please let me know if you are satisfied with my reply and any other questions you may have.
Regards,
Caridad
Caridad,
Thank you so much for your assistance. While I had some issues with completely understanding the 'tutorial' I was able to use this workaround to get everything setup properly, as you can see here: hidden link
Now I have one last 'view' to create and I'm not sure how to go about this. The list of names and list of subjects is going to become quite large and the client wants the index to be listed per letter. Basically I need to mimic the result of the attached Image. Can you advise me in this matter?
Thanks again!
I always liked this tutorial posted by one of our users:
hidden link
Please let me know if you are satisfied with my reply and any other questions you may have.
Regards,
Caridad
Thank you very much for that link. I had already found it and a couple of others and tried different methods from the PHP point of view. I ended up utilising jQuery instead. This allowed me to sort the results and split them by letter without having to indicate starting letters as a taxonomy which is an awful lot of work when you have a lot of content to work with 🙂