title: WordPress Conditional: Only show if current page title is equal to post meta
body: <p>I am calling a bunch of posts under a certain post type in WordPress which works but I am trying to add a conditional that will check first if those post's custom meta field (labeled "disc") is equal to the current post's title.</p>
  
  <p>Here is what I have but this conditional does not seem to work:</p>
  
  <pre><code>&lt;?php
     $pages = get_posts('numberposts=9999&amp;post_type=song&amp;post_status=publish&amp;order=ASC&amp;orderby=date');
  
     $i = 1;
     foreach( $pages as $page ) {
         $content = $page-&gt;post_title;
         if( empty($content) ) continue;
  
         $content = apply_filters('the_content', $content); ?&gt;
  
         &lt;?php if(get_post_meta($page-&gt;ID, "p30-disc", true)=="the_title()") { ?&gt;
  
         &lt;tbody class="vevent"&gt;
  
         &lt;?php if ($i%2===0) { ?&gt;&lt;tr class="gigpress-row gigpress-alt"&gt;
  
         &lt;?php } else { ?&gt;&lt;tr class="gigpress-row"&gt;&lt;?php } ?&gt;
  
         &lt;td&gt;&lt;?php echo $page-&gt;post_title ?&gt;&lt;/td&gt;
          &lt;td&gt;&lt;?php echo get_post_meta($page-&gt;ID, "p30-length", true); ?&gt;&lt;/td&gt;
          &lt;td&gt;&lt;a href="http://itunes.com/&lt;?php echo get_post_meta($page-&gt;ID, "p30-itunes-song", true); ?&gt;"&gt;BUY&lt;/a&gt;&lt;/td&gt;
  
          &lt;/tr&gt;
  
          &lt;tr class="gigpress-info"&gt;
  
          &lt;td colspan="3"&gt;&lt;?php echo $page-&gt;post_content ?&gt;&lt;/td&gt;
  
          &lt;/tr&gt;
  
          &lt;/tbody&gt;    
  
  &lt;?php $i++;
  
     } } ?&gt;
  </code></pre>
  
  <p>When I simply echo "get_post_meta($page->ID, "p30-disc", true)" or "the_title()" it spits out their proper values, which are equal, so obviously something is just wrong with that conditional.</p>
  
  <p>Thanks,</p>
  
  <p>Wade</p>