Support » Plugin: Automatic Youtube Video Posts Plugin » thumbnail code clashes with template code

  • epspk


    I think this automatic youtube posts plugin is really cool!
    Unfortunately, the free theme I am using doesn’t provide support
    and the thumbnails don’t show up at all. So after reading the docs
    on this plugin and some forum posts I have to use this code:
    <?php tern_wp_youtube_image(); ?>
    And I was able to find the exact file to insert it to and even the exact line. But I when I insert the code to this line from my theme:
    <div class="thumbnail"><?php the_post_thumbnail(array(300, 800)); ?></div>
    before the closing div, there is still a broken image space being displayed. I can remove it by replacing the
    <?php the_post_thumbnail(array(300, 800)); ?> code with
    <?php tern_wp_youtube_image(); ?>
    but other category pages not related to my youtube posts, wont display their own thumbnails.

    I have low knowledge in php script and I wondering if anyone can guide me on what to do with this? Is there a code that can replace the theme’s code line with the plugin’s code line mentioned above, just for a particular category, tag or post?


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ternstyle


    I would try an if statement which asks if there is a video assigned first. Something like:

    <?php if(get_post_meta($post->ID,’_tern_wp_youtube_video’,true)) { tern_wp_youtube_image(); } ?>

    Thank you for very nice Plugin.

    I use this code for thumb in archive.php of my template for gnerate image in category list :
    <?php if(get_post_meta($post->ID,’_tern_wp_youtube_video’,true)) { tern_wp_youtube_image(); } ?>

    I can’t define the image size at : 135×90 px

    Can you help me ?


    Plugin Author ternstyle


    The plugin now adds the images automatically anywhere your theme uses the_post_thumbnail at the size your theme specifies. I’d suggest going that route.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘thumbnail code clashes with template code’ is closed to new replies.