0
votes

I am using Wordpress Custom Field Template Plugin - http://wordpress.org/extend/plugins/custom-field-template/

I create some File filed like this

[slideshow]
type = file
relation = true
label = Images For the Slide show?

[slideshow]
type = file
relation = true
hideKey = true

[slideshow]
type = file
relation = true
hideKey = true

[slideshow]
type = file
relation = true
hideKey = true

And I want to show list the images from the file fields something like

<?php $slide_images = get_post_meta($post->ID, 'slideshow', false); ?>
   <ul id="slideshow">
                <?php foreach($slide_images as $slide_image) {
                    echo '<li>'.$slide_image.'</li>';
       } ?>
  <ul>

Reference : http://www.designfaire.com/2010/05/custom-post-types-and-custom-field-template-in-wordpress-3-0-beta-2/

http://wordpress.org/support/topic/plugin-custom-field-template-file-and-image-display?replies=13

1
Where are you stuck, where do errors occur?Bjoern
No errors now it printing the image ID only i want to get the image wp_get_attachment_url("Image ID", 'full');Sujith Kumar KS
If so you can use wp_get_attachment_url($slide_image, 'full'); instead of just $slide_image.Vasanthan.R.P
Got the solution, i made something like this <?php $slide_images = get_post_meta($post->ID, 'slideshow', false); ?> <ul id="slideshow"> <?php foreach($slide_images as $key=>$slide_image) { $slide_url = wp_get_attachment_image($slide_image, 'full'); echo '<li>'.$slide_url.'</li>'; } ?> Thanks for the helpSujith Kumar KS

1 Answers

0
votes

Got the Solution

<?php $slide_images = get_post_meta($post->ID, 'slideshow', false); ?>
            <ul id="slideshow">
                <?php  foreach($slide_images as $key=>$slide_image) {
                    $slide_url = wp_get_attachment_image($slide_image, 'full');
                    echo '<li>'.$slide_url.'</li>';
} ?>