WordPress.org

Ready to get started?Download WordPress

Forums

Automatic Youtube Video Posts Plugin
thumbnail code clashes with template code (4 posts)

  1. epspk
    Member
    Posted 1 year ago #

    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?

    Thanks!

    http://wordpress.org/extend/plugins/automatic-youtube-video-posts/

  2. mpraetzel
    Member
    Plugin Author

    Posted 1 year ago #

    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(); } ?>

  3. ExtremeNature
    Member
    Posted 1 year ago #

    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 : 135x90 px

    Can you help me ?

    Thanks

  4. mpraetzel
    Member
    Plugin Author

    Posted 9 months ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic