Tell us what you are trying to do? I currently have a 2 level nested view in place that shows a taxonomy | posts relationship here: hidden link However, this doesn't actually match the taxonomy structure that uses parent and child taxonomy. Ideally what I want to create is the following structure:
PARENT CATEGORY
Child Category
Post title
Post title
Post title
Child Category
Post title
Post title
Post title
etc.
PARENT CATEGORY
Child Category
Post title
Post title
Post title
Child Category
Post title
Post title
Post title
etc.
I searched for something similar but was unable to find it. Is this possible?
Hi, so it sounds like you need at least 3 Views:
1. A View of the taxonomy where the parent term is NONE. In the loop, output the term title and also View #2.
2. A View of the taxonomy where the parent term is set by the current term in the loop. In the Loop, output the term title and also View #3. Include the current term in the shortcode attribute for the Query Filter.
3. A View of posts where the taxonomy term is set by a shortcode attribute.
Is this how you have things set up? Can I take a closer look?
Hi Christian. Thanks for the quick response. I current just have a 2 level view set up which would be:
CATEGORY
post title
post title
post title
etc
But in order to do that, I need to make the taxonomy single level making my taxonomy terms look like PARENT >> CHILD rather than a hierarchical structure that the client wants. I will explain this further below.
Because it doesn't seem possible to filter/search nested views, I need to create another view that does filtering/searching and outputs the results below the search/filter area. When it returns results, it hides the nested view below.
However the Category > Subcategory levels I would ideally like to use won't show up in the filter select. There will never be any items stored at the parent category level, only the sub-category level. So I end up with items in the select that look like --subcategory name but without the context of the main parent category they appear under.
Ideally, I would like to see the search/filter show the full taxonomy path in select and in the results of the filter or search. And by default, the view below that that contains the unfiltered results would show a structure of:
PARENT CATEGORY
Child Category
Post title
Post title
Post title
Child Category
Post title
Post title
Post title
etc.
PARENT CATEGORY
Child Category
Post title
Post title
Post title
Child Category
Post title
Post title
Post title
etc.
Hopefully that makes sense. The page in question is here: hidden link
Thanks!
Exactly what you're asking for isn't achievable in the current software. You would need a way to organize the results of a post query by taxonomy term, which isn't really possible in the current system. It would take a considerable amount of custom code to get this right, and that falls outside the scope of what I'm able to offer here. The closest you can get to this result output is to use a hierarchical taxonomy, and to set up the 3 Views as I described. But then, you can't use a custom search for post title, because you can't filter a nested inner View by a filter in an outer View. The bottom line is it's not really possible to organize a custom search View of posts by taxonomy term like this.
Thanks. I suspected that that was the case but wanted to see if I had missed something. Thanks for your help on this.