Support » Themes and Templates » Images via custom fields on new theme

  • Hi,

    My website gets the post thumbnail via custom fields: Key: Thumbnail, Value: /mydomain.com/wp-content/uploads/thepicturesfolder/thepic.jpg

    The theme uses this code to get the thumbnail:

    <?php } elseif (get_post_meta($post->ID, 'Thumbnail', true) ) {?>

    The image is resized using Timthumb which is included in the theme inside a folder called “scripts” /scripts/timthumb.php

    I want to use a new theme which uses two different image sizes, and has several rows. The theme calls the image by using the following code:

    <img src="<?php get_the_image(); ?>" width="300" height="169" alt="" border="0" vspace="5" />

    And the thumbnail on the row using 120×68 thumbnails:

    <div class="img_left"><a href="<?php echo the_permalink(); ?>"><?php the_post_thumbnail(); ?></a></div>

    I’d like to use the new theme without having to add manually all the images again.

    Which code should I use instead of <img src="<?php get_the_image(); ?>" width="300" height="169" alt="" border="0" vspace="5" /> for images 300×169 and <div class="img_left"><a href="<?php echo the_permalink(); ?>"><?php the_post_thumbnail(); ?></a></div> for 120×68 thumbnails?

    Thanks in advance, any help will be greatly appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Anyone?

    I am using custom fields to display thumbnails Key: “Thumbnail” Value: the url to the image which is hosted on my server. My Theme uses 2 different image sizes. Big images are displaying without problems, however the small thumbnails are not displaying.

    Thumbnails are resized using timthumb wich is hosted in the same theme directory.

    In order to display the child thumbnails, what I need to change on the following code? (loop.php)

    [code moderated - please use pastebin.com for chunks of code]

    Thanks in advance, any help will be greatly appreciated.

    Sorry but I’m unable to edit my last post so here’s the code:

    http://pastebin.com/fT36Dtug

    Can you please delete this thread?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Images via custom fields on new theme’ is closed to new replies.