I am trying to load images through custom fields, rather than using the featured image.
My custom fields are as follows
name: image-small
value: /images/thumbs/small/example.jpg
PHP
<img src='<?php echo get_post_meta($post->ID, 'image-small', true); ?>'>
yet instead of writing the img src as
http://localhost/project.co.uk/images/thumbs/small/example.jpg
it displays
http://localhost/images/thumbs/small/example.jpg
is there a way to either write the htaccess so that it re-routes the url or, do I have to hardcode it into the HTML until I go live, then replace the code with whats above? Or is there a much easier way to do it?
I have found
but it didn't help me resolve it.
<img src='<?php echo get_post_meta($post->ID, $_SERVER['SERVER_NAME'] . 'image-small', true); ?>'>? - David Thomas