title: wordpress - How to filter post by date,month and year
body: <p>I create a WordPress post filter page. I want to filter posts by date, month and year. how can I do that?</p>
  
  <p>sample..</p>
  
  <pre><code>          's' =&gt; (!empty($_REQUEST["search"])?$_REQUEST["search"]:''),
            'post_type' =&gt; 'post',
            'post_status' =&gt;'publish',
            'cat' =&gt; 5,
            'posts_per_page' =&gt; 9,
            'paged' =&gt; 1,
            (!empty($_GET["monthnum"])?'monthnum' =&gt;$_GET["monthnum"]:false),
            (!empty($_GET["year"]))?'year' =&gt; $_GET["year"]:false),
            'orderby' =&gt;!empty($_GET["orderby"])?$_GET["orderby"]:'date'
          );```
  </code></pre>