2011-07-10, 12:20:23
(This post was last modified: 2011-07-10, 12:28:16 by Womens health.)
I'd like to use an Image custom field to supply a path to an image resizing script.
For instance, with TimThumb (http://code.google.com/p/timthumb/) a resized image is inserted with:
I tried
but that didn't work.
I suspect I need to do something like use return_custom_field('myname') to assign the path to a variable and then use the variable with TimThumb? But I don't really know how to do that because sadly my PHP knowledge is poor. Can anyone give me some advice to get this working?
Thanks.
For instance, with TimThumb (http://code.google.com/p/timthumb/) a resized image is inserted with:
Code:
<img src="timthumb.php?src=path/to/image.jpg&w=200">
I tried
Code:
<img src="timthumb.php?src=<?php get_custom_field('myname'); ?>&w=200">
I suspect I need to do something like use return_custom_field('myname') to assign the path to a variable and then use the variable with TimThumb? But I don't really know how to do that because sadly my PHP knowledge is poor. Can anyone give me some advice to get this working?
Thanks.