title: Parsing PHP in Sidebar Issue
body: <p>I'm using the below funky bit of code in my functions.php to enable the execution of PHP in my sidebar:</p>
  
  <pre><code>// 12. Execute/Parse PHP in Sidebar Content
  // =============================================================================
  add_filter('widget_text','execute_php',100);
  function execute_php($html){
       if(strpos($html,"&lt;"."?php")!==false){
            ob_start();
            eval("?"."&gt;".$html);
            $html=ob_get_contents();
            ob_end_clean();
       }
       return $html;
  }
  </code></pre>
  
  <p>I'm then using this code in my sidebar to reference a list of custom fields (related articles) that I want to list in the sidebar:</p>
  
  <pre><code>&lt;?php $post_objects = get_field( 'related_article_list'); ?&gt;
  &lt;?php if ( $post_objects) { ?&gt;
  &lt;ul&gt;
  &lt;?php foreach( $post_objects as $post): ?&gt;
  &lt;?php setup_postdata($post); ?&gt;
  &lt;li&gt;
  &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;
  &lt;/li&gt;
  &lt;?php endforeach; ?&gt;
  &lt;/ul&gt;
  &lt;?php wp_reset_postdata(); ?&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>Now this code works fine in my page template and correctly lists the three related articles that I have set in each post, but in the sidebar it just generates the current post title three times.</p>
  
  <p>Any ideas much appreciated!</p>