WordPress.org

Ready to get started?Download WordPress

Forums

Automatic Youtube Video Posts Plugin
Thumbnails Problems (3 posts)

  1. thomaswales
    Member
    Posted 1 year ago #

    Hello WordPress gang,

    Wondering if you could help me with abit of coding, I want the Thumbnails of the Youtube videos this plugin generates to be the 'Featured Image'.

    I am been messing around with the code but unable to get it to work.

    Please bear in mind I would like normal articles to have their Featured Image, and YouTube Video posts to have there.

    Is this possible? I pasted in the code below.

    <?php
    if ( has_post_thumbnail() ) { ?>
    	<a href="<?php the_permalink() ?>"><img class="postimg" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php get_image_url(); ?>&h=150&w=200&zc=1" alt=""/></a>
    <?php } else { ?>
    	<a href="<?php the_permalink() ?>"><img class="postimg" src="<?php bloginfo('template_directory'); ?>/images/dummy.png" alt="" /></a>
    <?php } ?>

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

  2. thomaswales
    Member
    Posted 1 year ago #

    Can anyone help me? This is for a charity website :-( and it would save alot of time and effort if this just worked.

    I'm sure its easy enough to code, but can;t figure it out.

  3. mpraetzel
    Member
    Plugin Author

    Posted 1 year ago #

    Have you tried using the built-in WordPress function the_post_thumbnail?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.