Viewing 4 replies - 1 through 4 (of 4 total)
  • can you repost the code and mark it properly?

    (please use a backtick before and after the code; or press the ‘code’ button once before writing/pasting the code, and once again afterwards.
    for any code longer than ten lines, please use the pastebin.

    nobody can really comment on the corrupted lines in the blockquotes.

    Thread Starter bbreeze25

    (@bbreeze25)

    thank you for the hint, alchymyth.

    as I said I am seeking for an advice, as I am a complete novice here, how to switch from using routinely copy pasting procedure with custom fields with purpose to show the thumbnails up. The question is how would I shift to using new features of WP (featured images) with preserving all the hard work done for a month with custom fields copy pasting.

    currently the code that show thumbnails up on the front page looks like:

    <?php	$values = get_post_custom_values("thumbnail");
    	              if (isset($values[0])) { ?>
                    <a href="<?php the_permalink() ?>" rel="bookmark" >
                    <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo get_option('home'); ?>/<?php $values = get_post_custom_values("thumbnail"); echo $values[0]; ?>&w=150&h=100&zc=1&q=100;" alt="<?php the_title(); ?>" class="left" />
                    </a>
               <?php } ?>

    I would really appreciate your help. ALl the images used for thumbnailing were assigned the name exactly the same as a post ID (literally, e.g. 1142.jpg) and stored in wp-content/uploads folder.

    many thanks
    `

    you already have a conditional statement in place – use an elseif for the post-thumbnails:

    http://pastebin.com/migK3rkj

    you probably need to fill in the parameters for the_post_thumbnail();
    check the details here:
    http://codex.wordpress.org/Function_Reference/the_post_thumbnail
    http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail

    Thread Starter bbreeze25

    (@bbreeze25)

    many thanks, alchy!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to switch from using custom fields to the_post_thumbnail’ is closed to new replies.