Hi Dave,
I didn't use a shortcode. I'll try to explain (I had to look back at my own code!):
First off, I set up a taxonomy and it's using a heirchy to create categories. The purpose was, for example, you can call it up in a selector/dropdown and see a list of headings and sub-subjects. Example:
HOMES
– Small
– Medium
– Large
JACKETS
– Red
– Green
etc.
You could further call up subs or more likely, the post of that child taxonomy. But I wound up not needing that.
VIEW 1: SHOW PARENT
Remember, this view is not displaying Post Types, it's displaying TAXONOMY.
Set up the query filter to "Parent is NONE" – This negative logic means that since it doesn't have a parent, it then IS a parent.
Then the Layout-HTML section, in the LOOP:
<!-- ------------- Display Current Parent as a Title Link ----------- --> [wpv-taxonomy-link] <!-- ------------- Call Child Categories ----------- --> [wpv-view name="ChildView"]
That's it! No other info is needed for this view to work.
VIEW 2: CHILD VIEW:
So at this point View1 found a parent, displayed it's info was sent to this view where we plan on looping through all children of that one parent before going back to the first view and look for another parent.
Same as View1: This view will display TAXONOMY (Not posts) – This is the top choice on the view form.
I checked " Include children in the post count" so I'd get all subchildren here as well (For my purposes this worked).
Set up the query filter to "Parent is the taxonomy selected by the parent view" – This is the key, no shortcode needed!
This is sortof the opposite of what we did in View1. It means that "To choose a post to display here, it's parent must be the same as the loop/view that this inquiry came from" — Thus, we just came from VIEW1 wwhere we found a parent, then came here and this line inly finds results of children of that parent.
Next in the Layout – HTML section:
<!-- Display Title to this post (which is a child of the parent who called this view) --> [wpv-taxonomy-title]
And that's all!
*** BONUS INFO:
I wanted to let the user click on the title and be taken to another page where we'd see the post. I wound up using the URL to send the user to a view that would then read that URL which will have any info passed in variables/fields. I can't recall why I did it this way rather than call a view directly with a shortcode. I think becasue then it was already setting up for a user-search function.
[php]
<!-- NOTE:This sends the link to a PAGE which has a VIEW -->
<a href="SITE.COM/SECTION/?variablename=[wpv-taxonomy-slug]">[wpv-taxonomy-title]</a>