title: Display posts with specific meta value in Wordpress
body: <p>I have a function which display posts of a custom post type in wordpress:</p>
  
  <p>Code:</p>
  
  <pre><code>&lt;?php
   $args = array(
                'post_type' =&gt; 'todo_listing',
                'posts_per_page' =&gt; 4,
                'order' =&gt; 'asc',
                'meta_value' =&gt; '0'
                );
   $loop = new WP_Query( $args );
   ?&gt;     
  
   &lt;ul class="leftlist"&gt;
  
  &lt;?php
  while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post();
  ?&gt;
  
          &lt;li class="todo" id="&lt;?php echo get_the_ID();?&gt;" itemage="&lt;?php echo get_post_meta(get_the_ID(),'_todotime',true)?&gt;"&gt;&lt;a href="javascript:;"&lt;?php if($all_meta_for_user[get_the_ID()][0]){               
          ?&gt;
          class="strike"
  
      &lt;?php
  }
  ?&gt;
         &gt;           
    &lt;?php if($all_meta_for_user[get_the_ID()][0]){?&gt;
              &lt;span class="check_box cb"&gt;&lt;/span&gt;
              &lt;?php }else{?&gt;
          &lt;span class="uncheck_box cb"&gt;&lt;/span&gt;
          &lt;?php }?&gt;   
          &lt;p&gt;&lt;?php the_title(); ?&gt;&lt;/p&gt;&lt;/a&gt;           
          &lt;?php
          endwhile;
          ?&gt;            
          &lt;/ul&gt;
  </code></pre>
  
  <p>Which results in the HTML rendered as follows:</p>
  
  <pre><code>&lt;li class="todo" id="1013" itemage=""&gt;&lt;a href="javascript:;" class=""&gt;
      &lt;span class="cb uncheck_box"&gt;&lt;/span&gt;
      &lt;p&gt;Some Text here&lt;/p&gt;&lt;/a&gt;
  &lt;/li&gt; 
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;li class="todo" id="1013" itemage=""&gt;&lt;a href="javascript:;" class=""&gt;
      &lt;span class="check_box"&gt;&lt;/span&gt;
      &lt;p&gt;Some Text here&lt;/p&gt;&lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>If the class has <code>span class="cb uncheck_box"</code> the meta value is 0 and if the <code>span class="check_box"</code>, meta value is 1. </p>
  
  <p>I only want to show those items with Meta Value 1. How can I modify the above wordpress function to achieve this?</p>