Forums

Using post thumbnail with post rotator (7 posts)

  1. janpulpan
    Member
    Posted 1 year ago #

    Hi,

    i am using an wordpress theme with this code for new post rotation:

    $headline_preview = get_post_custom_values("preview-big");
    						if ( is_array($headline_preview) ) { ?>
    							<img class="teaser-image" src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, 'preview-big',true) ?>&w=390&h=252&zc=1" alt="<?php the_title(); ?>" />
    						<?php }	else { ?>
    							<img class="teaser-image" src="<?php bloginfo('template_directory'); ?>/images/image-blank-headline.jpg" alt="<?php the_title(); ?>" />
    						<?php } ?>

    You can see, this code is using custom fields, but i want to use the post thumbnail.
    Can someone help me to recode it?

    Thanks
    Jan

  2. janpulpan
    Member
    Posted 1 year ago #

    Hey, please help somebody. It's realy urgent. Thanks Jan

  3. MAS
    Member
    Posted 1 year ago #

    use the_post_thumbnail() function, if your WP is 3.0

  4. janpulpan
    Member
    Posted 1 year ago #

    thanks for reply.
    i use the WP 2.9.2, but thats not the problem. i know the code for post thumbnail. I just don't know how to make it working with the code above (i'm not a good PHP programmer).

  5. MAS
    Member
    Posted 1 year ago #

  6. janpulpan
    Member
    Posted 1 year ago #

    thanks chinmoy for the link. do you know someone who can recode it for free for me?
    I'm right know on an film festival and have no time to studing it.

    Jan

  7. janpulpan
    Member
    Posted 1 year ago #

    Ok, than i just need code, that returns me just the image url of concrete post.

    Jan

Topic Closed

This topic has been closed to new replies.

About this Topic