title: Wordpress: Replacing featured image with video (but only on single posts not homepage excerpts)
body: <p>I'm trying to figure out how to only apply the function of the plugin called <a href="https://wordpress.org/plugins/replace-featured-image-with-video/" rel="nofollow">Replace featured Image with Video</a>, to the blog post itself and not the homepage excerpts (so there is a featured image on excerpts and no video, but a video and no image on the post itselft), however I haven't yet succeeded doing so.</p>
  
  <p>I tried working on this part of the code: </p>
  
  <p>(Note that this is just a code snippet of that whole plugin)
      //***********************************************************
      // Replace the video
      //***********************************************************
      function filter_featured_image_to_video( $html, $post_id = 0 ) {</p>
  
  <pre><code>global $post;
  if ( isset($post) &amp;&amp; !empty($post) ) {
      $x = get_post_meta( $post-&gt;ID, '_related-video', true);
      if (strlen($x) &gt; 0)
          return $x;
  }
  
  return $html;
  
  }
  
  if (!is_admin())
      add_filter( 'post_thumbnail_html', 'filter_featured_image_to_video' );
  </code></pre>
  
  <p>What made most sense to me was changing <em>if (!is_admin())</em> to <em>if ( !is_admin() &amp;&amp; (is_sinlge() )</em> but that stops the entire site from loading, and leaves a blank screen.</p>
  
  <p>I also tried making a standalone statement only using if (is_single()), but that also makes things go blank.</p>
  
  <p>What am I missing?</p>