Tell us what you are trying to do?
Following on from some useful help yesterday with displaying tags in a taxonomy in a bespoke order, I now realise that I need to go a step further. I need my tags to display like this:
I did a bit of research and figure that I may need to use nested views and found documentation for legacy features which shows that it is possible to show a Taxonomy view with a taxonomy view for a child. Image attached shows roughly what I'm hoping to achieve.
However, I'm clearly getting it all wrong because I end up with long lists of "no items found"
Here's what I did:
I created the child view that will be nested using a taxonomy filter, selecting the posts with the taxonomy: [my taxonomy] set by the parent taxonomy view. Inside that view, I added a field to display the taxonomy.
Next I created a parent view using a taxonomy filter, selecting the posts with taxonomy [my taxonomy] in all of the (parent) tags (via the checkboxes).
In the view I added a field to include the shortcode for the child view that I previously created.
But I was hoping to find something whereby I could select "parent is none" for the top level.
And then I will need to do something to show only the tags relating to the current post, as I only want the relevant tags to display.
It should solve my issue and it makes sense but I'm only wanting to display the term and am getting somewhat muddled.
My taxonomy is called Supplier Specialisms
Within I have tags such as
Marketing (parent)
- design
- copywriting
- web design
HR (parent)
- training and development
- wellbeing
(There are seven parents and each has a number of children.)
But I only want to display the tags that relate to the current supplier's specialisms… do I need to nest another view to get it to display the content for the post?
In the attached screen shots, the first view is the child and the second view is the parent. And, so far, I've only managed to achieve "no items found" or a long list of all the tags in the taxonomy.
Yes - you will have to use the nested view but you can use nested views in classic mode as Toolset Block does not support nested views.
Here is a sandbox site and you can login to that using the following link:
- hidden link
If you can setup a minimum structure with content for your taxonomy and tell me in what format you want to display and what I'm happy to build those view for you.
In the sandbox I have added a taxonomy called styles to the CPT Holiday Homes. The tags have parents and children.
I have made a template to display the Holiday Homes and there are 3 posts. I have used Fields and Text to display the relevant dynamic tags. You will see that each post has assigned different styles, some with and some without the parent tag. The tags are shown in alphabetical order, but what I require is the tags to be displayed parent, child, parent, child. For example, "Accommodation C" shows these tags:
Exterior finish (parent)
Planting (parent)
pastel (child of Exterior finish)
south-facing rear garden (child)
tile-hung (child)
white (child of Exterior finish)
But the order should be:
Exterior finish (parent)
pastel (child of the parent above)
white (child of the parent above)
Planting (a parent without any children selected)
tile-hung (a child without its parent selected)
south-facing rear garden (a child without its parent selected)
I hope that makes sense, and I know it sounds a convoluted, but this is what my client is asking for.
I will hopefully get to test this very soon, but for now I have a bigger problem in that I can not longer edit my templates. I'm going to raise another ticket as I think it is a separate problem.