title: Group custom post types by taxonomy in timber (Wordpress)
body: <p>I'm having a hard time figuring out how to group a collection of post with the same taxonomy "year" attached to them in Wordpress, without using a separate archive template.</p>
  
  <p>I Finally managed to get it to work with Wordpress, but now I want to translate this to timber, and I just can't seem to be able to do so. Can anyone give me some pointers?</p>
  
  <p><strong>This is the working wordpress code</strong> </p>
  
  <pre><code>$date_now = date('Y-m-d H:i:s');
  $ex_terms = get_terms( 'exhibition-year','orderby=name&amp;order=desc' );
  
  foreach ( $ex_terms as $ex_term ) {
      $member_group_query = new WP_Query(
          array(
              'post_type' =&gt; 'exhibition',
              'tax_query' =&gt; array(
                  array(
                  'taxonomy' =&gt; 'exhibition-year',
                  'field' =&gt; 'slug',
                  'terms' =&gt; array( $ex_term-&gt;slug ),
                  'operator' =&gt; 'IN'
                  )
              ),
              'meta_query'        =&gt; array(
                  array(
                  'key'           =&gt; 'date_end',
                  'compare'       =&gt; '&lt;',
                  'value'         =&gt; $date_now,
                  'type'          =&gt; 'DATETIME'
                  )
              )
          )
      );
  
      if($ex_term-&gt;slug &lt;= date('Y')){
      ?&gt;
          &lt;h2&gt;&lt;?php echo $ex_term-&gt;name; ?&gt;&lt;/h2&gt;
          &lt;ul&gt;
          &lt;?php
          if ( $member_group_query-&gt;have_posts() ) : while ( $member_group_query-&gt;have_posts() ) : $member_group_query-&gt;the_post(); ?&gt;
              &lt;li&gt;&lt;?php echo the_title(); ?&gt;&lt;/li&gt;
          &lt;?php endwhile; endif; ?&gt;
          &lt;/ul&gt;
          &lt;?php
          // Reset things, for good measure
          $member_group_query = null;
          wp_reset_postdata();
      }
  }
  </code></pre>
  
  <p>The desired outcome should look something similar to this, I'm only displaying the titles. But it should contain the entire postdata.</p>
  
  <p><strong>The desired outcome</strong>
  <a href="https://i.stack.imgur.com/NnN0h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NnN0h.png" alt="enter image description here"></a></p>
  
  <p>I've looked into:</p>
  
  <p><a href="https://timber.github.io/docs/reference/timber-post/" rel="nofollow noreferrer">https://timber.github.io/docs/reference/timber-post/</a>
  <a href="https://timber.github.io/docs/reference/timber-postquery/" rel="nofollow noreferrer">https://timber.github.io/docs/reference/timber-postquery/</a>
  and
  <a href="https://timber.github.io/docs/reference/timber/#get-terms" rel="nofollow noreferrer">https://timber.github.io/docs/reference/timber/#get-terms</a></p>
  
  <p>Please help, it's driving me insane :)</p>