title: WordPress - How to map a URL path to a WP_Query?
body: <p>I am new to WordPress development and have created a custom type of <code>event</code>. I would now like to create a page which shows all upcoming events.</p>
  
  <p>An <code>event</code> has the following fields:</p>
  
  <ul>
  <li><code>title</code></li>
  <li><code>description</code></li>
  <li><code>event_date</code> (type is <a href="https://github.com/CMB2/CMB2/wiki/Field-Types" rel="nofollow noreferrer">CMB2's</a> <code>text_date_timestamp</code>)</li>
  </ul>
  
  <p>This works, and I have used <code>manage_edit-{$post_type}_columns</code> to create an admin UI that allows for sorting by <code>event_date</code>. So far so good. :-)</p>
  
  <p>But now I want to map a URL like <code>www.example.com/upcoming-events</code> to a page which shows:</p>
  
  <ul>
  <li>Only show <code>event</code>s with an <code>event_date</code> in the future.</li>
  <li>Ordered by <code>event_date</code> in ascending order.</li>
  </ul>
  
  <p>I need some help joining up a few dots ... I guess that I will need to use <code>WP_Query</code>. But how do I map the URL path to a page with this <code>WP_Query</code>?</p>