Sure, please look at your WordPress Archive for the Category taxonomy. This is what the loop looked like a moment ago:
<wpv-loop>[wpv-view name="dynamic-category-menu"]</wpv-loop>
I just inserted a post title shortcode before the "dynamic category menu" View, so now it looks like this:
<wpv-loop>[wpv-post-title][wpv-view name="dynamic-category-menu"]</wpv-loop>
If you test the Accessories category archive now on the front-end, you'll see the FS 50-M Tripod product appear:
hidden link
That's because I added the wpv-post-title shortcode to the loop. Without it, nothing was showing up because the dynamic category menu View wasn't returning any results. I edited the dynamic category menu View and found that the checkbox for "Don't include empty terms" was checked, and this is why no results were displayed in the dynamic category menu View. As you can see in the taxonomy overview here, no posts exist for the child terms of "Accessories": hidden link
After I unchecked that checkbox, two term results are now displayed in that View (the two immediate children terms). No category-image is displayed for either of these terms because you have not added the image to either of the terms in wp-admin.
Feel free to remove the wpv-post-title shortcode from the WordPress Archive, I left it in place to help explain what's happening. Let me know if you have questions about this.
Christian, thank you so much for the detailed explanation and support, I really appreciate it!
Apologies for the delay in replying but I wanted to ensure that I do my part in finding answers to my questions, rather than just expecting you to provide them. I have worked through your responses and the documentation and my head is spinning to be honest. 🙂
So I apologise if I am asking questions that I should know the answer to through your previous feedback.
Overview:
hidden link is the main products page on which I'd like only the main product categories as shown in the orange navigation buttons at the top of the page content to appear.
- Survey Instruments
- Measuring Instruments
- Construction Lasers
- Environmental Instruments
- Accessories
If the user clicks on any of these main categories, they should be taken to either:
a) A page that shows the subcategories under the main product category that they clicked (if the main product category contains subcategories) OR
b) A page that shows all the products in the product category they clicked (if that product category contains no subcategories)
hidden link is one of 5 main product category pages on which I'd like to display any subcategories of the main product category, or if there are no subcategories, the products in that product category.
Using the information you provided, I have created a view of product categories and placed it on hidden link. However, it shows all the categories and subcategories and I would like to display only the 5 main product categories on this page.
If I change the taxonomy filter for this view to "Select taxonomy terms whose parent is None." it does display correctly, but clicking on the product category returns no items. I am assuming that I will need to create an additional view to display subcategories/products when the user clicks on a main product category? If so, how would I assign the new view that I create to subcategories and products only?
Or, is it possible to use one view for showing main product categories on the main products page AND show subcategories only when the user has clicked on a main product category?
Please take a look at some changes I made. Let's start here:
hidden link
Click "Accessories" in the View and you will be redirected to this WordPress Archive:
hidden link
hidden link
Now you will see a list of child terms, created by this View:
hidden link
Click "Survey Instruments", then "Prisms Poles and Tripods". You will be redirected to the same WordPress Archive, applied to a different hierarchical term:
hidden link
hidden link
Now you will see a list of Products associated with the term Prisms Poles and Tripods, because this term has no child terms.
hidden link
Is this more like what you're expecting?
Hello Christian, that is exactly what I needed, thank you so much!!
A final question (I hope!): Is there a way to hide the uncategorised item in all these views?
Thank you for all the time and trouble you took to help me, I really appreciate it tremendously! I realise that I need to understand how views, content templates and archives fit together and how to link views etc. Is there any documentation that clearly outlines this or should I just work through all the documentation from start to finish to understand this?
Thank you again, Christian. I'll work through the documentation again.
Just one final (really!) question: If I'd like to display a similar view as hidden link when the user clicks on one of the Industries tags on hidden link (or any other single product page), what is the best way to achieve this?
I appreciate your time and support tremendously, you've gone above and beyond to assist me and provide me with the information I needed and my issue has been resolved. Thank you.
Industries taxonomy terms will have archive URLs generated automatically by WordPress. Like this one for "Building Trades":
hidden link
If you want to design the main content area of that page, you can use Toolset's WordPress Archives. Go to Toolset > WordPress Archives to create a new WordPress Archive and assign it to the Industry taxonomy. The design you create here will be displayed on all Industry term archive pages automatically. If you want to simply display products with this taxonomy term, you don't need a separate View. The taxonomy term WordPress Archive is basically a shortcut to add a View with a taxonomy term filter. Choose the content types you want to display here (Products) and use the Loop Wizard to design the output of the list of products.
If you want a system more like the archives for Categories, where you show the icons of child terms if child terms exist, otherwise show products, then you should replicate the setup from your Product Categories WordPress Archive: hidden link
My issue is resolved now. Thank you!