I’ve set-up a basic template that contains custom fields meta:
<?php
/*
Template Name: Store Page
*/
get_header(); the_post();?>
<div id="primary">
<div id="content" role="main">
<div class="main-image">
<img src='<?php echo get_post_meta($post->ID,'main-image',true);?>'/>
</div>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>
I have a custom field that displays an image but i can’t seem to work out how to display the image in the custom value field without using the full path to the image file ? see below:

It displays fine with the full path.
If i try and use images/individual01.jpg in custom field value the image does not appear. is it possible to enter a relative path to the file ?
Any ideas ? Many thanks
Relative paths are relative to the current URL/route. So
images/individual01.jpgis relative to whatever page you’re on. Assuming you’re using pretty URLs,http://127.0.0.1/my-pagewould link to that image ashttp://127.0.0.1/my-page/images/individual01.jpg. Of course, we know that doesn’t exist, which is why the image doesn’t work.Relative URLs are ok in css, but not in the template of a routed web application. There’s heaps of plugins that will do this for you anyway, might be better off using one of them instead: http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/