Hi!
I've been racking my brain for hours, but I can't figure it out.
I’d like to create a view which lists posts of one post type sorted by two taxonomies. The filtering/sorting should be nested.
Example Setup:
Custom post type “Training”
Custom taxonomies “Category” and “Type of presentation”
The view then should do this:
Show all posts of a specific “Category” term (definded by taxonomy filter), e.g. “Service” or “Sales”.
Then loop through all “Type of presentation” terms and list the posts sorted be the “Type of presentation” terms.
View “Service”:
All posts of category “Service”
Type of presentation “e-Training”
Post 1
Post 2
Post 3
Type of presentation “Webinar”
Post 4
Post 5
Post 6
Type of presentation “Podcast”
Post 7
Post 8
Post 9
Output:
<h1>Service</h1>
<h2>e-Training</h2>
<ul>
<li>Post 1</li>
<li>Post 2</li>
<li>Post 3</li>
<ul>
<h2>Webinar</h2>
<ul>
<li>Post 4</li>
<li>Post 5</li>
<li>Post 6</li>
<ul>
<h2>Podcast</h2>
<ul>
<li>Post 7</li>
<li>Post 8</li>
<li>Post 9</li>
<ul>
Another view “Sales”:
All posts of category “Sales”
Type of presentation “e-Training”
Post 10
Post 11
Post 12
Type of presentation“Webinar”
Post 13
Post 14
Post 15
Type of presentation “Podcast”
Post 16
Post 17
Post 18
Output:
<h1>Sales</h1>
<h2>e-Training</h2>
<ul>
<li>Post 10</li>
<li>Post 11</li>
<li>Post 12</li>
<ul>
<h2>Webinar</h2>
<ul>
<li>Post 13</li>
<li>Post 14</li>
<li>Post 15</li>
<ul>
<h2>Podcast</h2>
<ul>
<li>Post 16</li>
<li>Post 17</li>
<li>Post 18</li>
<ul>
Finally, it is possible, that one post is on more than one category and/or type of presentation. For example, "Post 20" is in the categories "Service" and "Sales" and in the presentation types "Webinar" and "Podcasts".
Is it possible to create views for this? If this is unclear, I can also create a scribble.
Best regards
Matthias